Documentation ¶
Overview ¶
Package nilaway implements the top-level analyzer that simply retrieves the diagnostics from the accumulation analyzer and reports them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "nilaway", Doc: _doc, Run: run, FactTypes: []analysis.Fact{}, Requires: []*analysis.Analyzer{config.Analyzer, accumulation.Analyzer}, }
Analyzer is the top-level instance of Analyzer - it coordinates the entire dataflow to report nil flow errors in this package. It is needed here for nogo to recognize the package.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package accumulation coordinates the entire workflow and collects the annotations, full triggers, and then runs inference to generate and return all potential diagnostics for upper-level analyzers to report.
|
Package accumulation coordinates the entire workflow and collects the annotations, full triggers, and then runs inference to generate and return all potential diagnostics for upper-level analyzers to report. |
Package annotation implements annotation-related structs (site, maps, triggers) and methods.
|
Package annotation implements annotation-related structs (site, maps, triggers) and methods. |
Package assertion implements a sub-analyzer that collects full triggers from the sub-analyzers and combine them into a list of full triggers for the entire package.
|
Package assertion implements a sub-analyzer that collects full triggers from the sub-analyzers and combine them into a list of full triggers for the entire package. |
affiliation
Package affiliation implements the affliation analyzer that tries to find the concrete implementation of an interface and create full triggers for them.
|
Package affiliation implements the affliation analyzer that tries to find the concrete implementation of an interface and create full triggers for them. |
anonymousfunc
Package anonymousfunc implements a sub-analyzer to analyze anonymous functions in a package.
|
Package anonymousfunc implements a sub-analyzer to analyze anonymous functions in a package. |
function
Package function implements a sub-analyzer to create full triggers for each function declaration.
|
Package function implements a sub-analyzer to create full triggers for each function declaration. |
function/assertiontree
Package assertiontree contains the node definitions for the assertion tree, as well as the main backpropagation algorithm.
|
Package assertiontree contains the node definitions for the assertion tree, as well as the main backpropagation algorithm. |
function/functioncontracts
Package functioncontracts implements a sub-analyzer to analyze function contracts in a package, i.e., parsing specified function contracts written as special comments before function declarations, or automatically inferring function contracts from the function body.
|
Package functioncontracts implements a sub-analyzer to analyze function contracts in a package, i.e., parsing specified function contracts written as special comments before function declarations, or automatically inferring function contracts from the function body. |
function/preprocess
Package preprocess hosts preprocessing logic for the input (e.g., CFGs etc.) to make it more amenable to analysis.
|
Package preprocess hosts preprocessing logic for the input (e.g., CFGs etc.) to make it more amenable to analysis. |
function/producer
Package producer contains definitions for parsed producers, which are the result of ParseExprAsProducer.
|
Package producer contains definitions for parsed producers, which are the result of ParseExprAsProducer. |
global
Package global implements a sub-analyzer to create full triggers for global variables.
|
Package global implements a sub-analyzer to create full triggers for global variables. |
structfield
Package structfield implements a sub-analyzer that collects struct fields accessed within a function to aid the analysis of the main function analyzer.
|
Package structfield implements a sub-analyzer that collects struct fields accessed within a function to aid the analysis of the main function analyzer. |
cmd
|
|
gclplugin
Package gclplugin implements the golangci-lint's module plugin interface for NilAway to be used as a private linter in golangci-lint.
|
Package gclplugin implements the golangci-lint's module plugin interface for NilAway to be used as a private linter in golangci-lint. |
nilaway
main package makes it possible to build NilAway as a standalone code checker that can be independently invoked to check other packages.
|
main package makes it possible to build NilAway as a standalone code checker that can be independently invoked to check other packages. |
Package config implements the configurations for NilAway.
|
Package config implements the configurations for NilAway. |
Package diagnostic hosts the diagnostic engine, which is responsible for collecting the conflicts from annotation-based checks (no-infer mode) and/or inference (full-infer mode) and generating user-friendly diagnostics from those conflicts.
|
Package diagnostic hosts the diagnostic engine, which is responsible for collecting the conflicts from annotation-based checks (no-infer mode) and/or inference (full-infer mode) and generating user-friendly diagnostics from those conflicts. |
Package hook implements a hook framework for NilAway where it hooks into different parts to provide additional context for certain function calls.
|
Package hook implements a hook framework for NilAway where it hooks into different parts to provide additional context for certain function calls. |
Package inference implements the inference algorithm in NilAway to automatically infer the nilability of the annotation sites.
|
Package inference implements the inference algorithm in NilAway to automatically infer the nilability of the annotation sites. |
Package nilawaytest implements utility functions for tests.
|
Package nilawaytest implements utility functions for tests. |
tools
module
|
|
Package util implements utility functions for AST and types.
|
Package util implements utility functions for AST and types. |
analysishelper
Package analysishelper provides helper functions for the `go/analysis` package.
|
Package analysishelper provides helper functions for the `go/analysis` package. |
asthelper
Package asthelper implements utility functions for AST.
|
Package asthelper implements utility functions for AST. |
orderedmap
Package orderedmap implements a generic ordered map that supports iteration in insertion order.
|
Package orderedmap implements a generic ordered map that supports iteration in insertion order. |
Click to show internal directories.
Click to hide internal directories.