Expanded linting + fix warnings (#1396)
* Expand the linters and types of warnings to improve consistency and safety * Fail lint workflow if there are errors * golint has been replaced by revive * Hand-pick some of the default exclude list * Ignore error when trying to delete preview gif * Ignore linter warning opening playlist path * Rename user field Id -> ID * A bunch of renames to address linter warnings * Rename ChatClient -> Client per linter suggestion best practice * Rename ChatServer -> Server per linter suggestion best practice * More linter warning fixes * Add missing comments to all exported functions and properties
This commit is contained in:
@@ -1,14 +1,28 @@
|
||||
run:
|
||||
tests: false
|
||||
modules-download-mode: readonly
|
||||
|
||||
issues:
|
||||
# The linter has a default list of ignorable errors. Turning this on will enable that list.
|
||||
exclude-use-default: false
|
||||
|
||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
||||
max-issues-per-linter: 0
|
||||
|
||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||
max-same-issues: 0
|
||||
|
||||
exclude:
|
||||
- Subprocess launch(ed with variable|ing should be audited)
|
||||
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
|
||||
- G307 # Allow closing files as a defer without checking error.
|
||||
- composite literal uses unkeyed fields
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- bodyclose
|
||||
- dupl
|
||||
- errcheck
|
||||
- exportloopref
|
||||
- goconst
|
||||
- godot
|
||||
@@ -16,10 +30,13 @@ linters:
|
||||
- goimports
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- govet
|
||||
- misspell
|
||||
- prealloc
|
||||
- revive
|
||||
- rowserrcheck
|
||||
- sqlclosecheck
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- unparam
|
||||
- whitespace
|
||||
@@ -27,4 +44,4 @@ linters:
|
||||
linters-settings:
|
||||
govet:
|
||||
disable:
|
||||
- composites
|
||||
- composite
|
||||
|
||||
Reference in New Issue
Block a user