Skip to content

Commit

Permalink
Enable golangci-lint for build monitor
Browse files Browse the repository at this point in the history
Signed-off-by: Nino Kodabande <[email protected]>
  • Loading branch information
Nino-K committed Nov 21, 2023
1 parent 315a4df commit 1cd0a9b
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
111 changes: 111 additions & 0 deletions .github/workflows/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
linters-settings:

Check failure

Code scanning / check-spelling

Check File Path Error

golangci is not a recognized word. (check-file-path)
dupl:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

dupl is not a recognized word. (unrecognized-spelling)
threshold: 100
funlen:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

funlen is not a recognized word. (unrecognized-spelling)
lines: 100
statements: 50
goconst:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

goconst is not a recognized word. (unrecognized-spelling)
min-len: 2
min-occurrences: 3
gocritic:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocritic is not a recognized word. (unrecognized-spelling)
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocyclo is not a recognized word. (unrecognized-spelling)
min-complexity: 15
gomnd:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gomnd is not a recognized word. (unrecognized-spelling)
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
ignored-numbers:
- '0'
- '1'
- '2'
- '3'
ignored-functions:
- strings.SplitN

lll:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

lll is not a recognized word. (unrecognized-spelling)
line-length: 140
misspell:
locale: US
nolintlint:

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

nolintlint is not a recognized word. (unrecognized-spelling)
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped

linters:
disable-all: true
enable:
- bodyclose

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

bodyclose is not a recognized word. (unrecognized-spelling)
- deadcode

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

deadcode is not a recognized word. (unrecognized-spelling)
- dogsled
- dupl

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

dupl is not a recognized word. (unrecognized-spelling)
- errcheck
- exportloopref

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

exportloopref is not a recognized word. (unrecognized-spelling)
- gochecknoinits

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gochecknoinits is not a recognized word. (unrecognized-spelling)
- goconst

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

goconst is not a recognized word. (unrecognized-spelling)
- gocritic

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocritic is not a recognized word. (unrecognized-spelling)
- gocyclo

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocyclo is not a recognized word. (unrecognized-spelling)
- gofmt
- goimports

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

goimports is not a recognized word. (unrecognized-spelling)
- gomnd

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gomnd is not a recognized word. (unrecognized-spelling)
- goprintffuncname

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

goprintffuncname is not a recognized word. (unrecognized-spelling)
- gosec
- gosimple

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gosimple is not a recognized word. (unrecognized-spelling)
- govet
- ineffassign

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

ineffassign is not a recognized word. (unrecognized-spelling)
- lll

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

lll is not a recognized word. (unrecognized-spelling)
- misspell
- nakedret

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

nakedret is not a recognized word. (unrecognized-spelling)
- noctx

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

noctx is not a recognized word. (unrecognized-spelling)
- nolintlint

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

nolintlint is not a recognized word. (unrecognized-spelling)
- staticcheck
- structcheck

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

structcheck is not a recognized word. (unrecognized-spelling)
- stylecheck

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

stylecheck is not a recognized word. (unrecognized-spelling)
- typecheck
- unconvert
- unparam

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

unparam is not a recognized word. (unrecognized-spelling)
- unused
- varcheck

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

varcheck is not a recognized word. (unrecognized-spelling)
- whitespace

# don't enable:
# - asciicheck

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

asciicheck is not a recognized word. (unrecognized-spelling)
# - funlen

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

funlen is not a recognized word. (unrecognized-spelling)
# - scopelint

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

scopelint is not a recognized word. (unrecognized-spelling)
# - gochecknoglobals

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gochecknoglobals is not a recognized word. (unrecognized-spelling)
# - gocognit

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocognit is not a recognized word. (unrecognized-spelling)
# - godot

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

godot is not a recognized word. (unrecognized-spelling)
# - godox

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

godox is not a recognized word. (unrecognized-spelling)
# - goerr113

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

goerr is not a recognized word. (unrecognized-spelling)
# - interfacer
# - maligned
# - nestif

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

nestif is not a recognized word. (unrecognized-spelling)
# - prealloc

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

prealloc is not a recognized word. (unrecognized-spelling)
# - testpackage

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

testpackage is not a recognized word. (unrecognized-spelling)
# - revive
# - wsl
# - depguard # Requires configuration and by default only allows stdlib imports

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

depguard is not a recognized word. (unrecognized-spelling)

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
linters:
- gosec
- errcheck
- gocritic

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

gocritic is not a recognized word. (unrecognized-spelling)
1 change: 1 addition & 0 deletions .github/workflows/github-runner-monitor-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ jobs:
- uses: golangci/[email protected]
# This is only safe because this workflow does not allow writing
with:
args: --config=.golangci.yaml --verbose --timeout 3m

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

golangci is not a recognized word. (unrecognized-spelling)
working-directory: src/go/github-runner-monitor
only-new-issues: true

0 comments on commit 1cd0a9b

Please sign in to comment.