mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
style(general): cleanup forbidigo linter config (#4540)
Update `forbidigo` linter config to remove patterns for deprecated `ioutil` functions and symbols. The usage of deprecated symbols already flagged by the other linters, in particular `staticcheck` (SA1019 rule)
This commit is contained in:
@@ -19,14 +19,6 @@ linters:
|
||||
forbidigo:
|
||||
forbid:
|
||||
- pattern: filepath.IsAbs # use ospath.IsAbs which supports windows UNC paths
|
||||
- pattern: ioutil.Discard # use io.Discard
|
||||
- pattern: ioutil.NopCloser # use io.NopCloser
|
||||
- pattern: ioutil.ReadAll # use io.ReadAll
|
||||
- pattern: ioutil.ReadDir # use os.ReadDir
|
||||
- pattern: ioutil.ReadFile # use os.ReadFile
|
||||
- pattern: ioutil.TempDir # use os.MkdirTemp
|
||||
- pattern: ioutil.TempFile # use os.CreateTemp
|
||||
- pattern: ioutil.WriteFile # use os.WriteFile
|
||||
- pattern: time.Now # do not use outside of 'clock' and 'timetrack' packages use clock.Now or timetrack.StartTimer
|
||||
- pattern: time.Since # use timetrack.Timer.Elapsed()
|
||||
- pattern: time.Until # never use this
|
||||
|
||||
Reference in New Issue
Block a user