mirror of
https://github.com/securego/gosec.git
synced 2025-07-15 01:04:43 +02:00
Allow excluding analyzers globally (#1180)
* This change does not exclude analyzers for inline comment * Changed the expected issues count for G103, G109 samples for test. Previously G115 has been included in the issue count * Show analyzers IDs(G115, G602) in gosec usage help * See #1175
This commit is contained in:
@ -35,14 +35,6 @@ type SSAAnalyzerResult struct {
|
||||
SSA *buildssa.SSA
|
||||
}
|
||||
|
||||
// BuildDefaultAnalyzers returns the default list of analyzers
|
||||
func BuildDefaultAnalyzers() []*analysis.Analyzer {
|
||||
return []*analysis.Analyzer{
|
||||
newConversionOverflowAnalyzer("G115", "Type conversion which leads to integer overflow"),
|
||||
newSliceBoundsAnalyzer("G602", "Possible slice bounds out of range"),
|
||||
}
|
||||
}
|
||||
|
||||
// getSSAResult retrieves the SSA result from analysis pass
|
||||
func getSSAResult(pass *analysis.Pass) (*SSAAnalyzerResult, error) {
|
||||
result, ok := pass.ResultOf[buildssa.Analyzer]
|
||||
|
Reference in New Issue
Block a user