Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = SCAnalyzer.Analyzer
View Source
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{ Analyzer: &analysis.Analyzer{ Name: "SA9007", Run: run, Requires: []*analysis.Analyzer{buildir.Analyzer}, }, Doc: &lint.RawDocumentation{ Title: "Deleting a directory that shouldn't be deleted", Text: ` It is virtually never correct to delete system directories such as /tmp or the user's home directory. However, it can be fairly easy to do by mistake, for example by mistakingly using \'os.TempDir\' instead of \'ioutil.TempDir\', or by forgetting to add a suffix to the result of \'os.UserHomeDir\'. Writing d := os.TempDir() defer os.RemoveAll(d) in your unit tests will have a devastating effect on the stability of your system. This check flags attempts at deleting the following directories: - os.TempDir - os.UserCacheDir - os.UserConfigDir - os.UserHomeDir `, Since: "2022.1", Severity: lint.SeverityWarning, MergeIf: lint.MergeIfAny, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.