chore(linter): enable gosec on golangci linter and reformat config file (#1983)

add in gosec to the golangci.yml config file and reorder the linters-settings to be in alphabetical order
This commit is contained in:
sesheffield 2024-08-07 12:24:27 -04:00 committed by GitHub
parent 774e2efce8
commit 3c4d91a443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,7 +39,7 @@ linters:
- mnd - mnd
# - gomodguard # - gomodguard
- goprintffuncname - goprintffuncname
# - gosec - gosec
- gosimple - gosimple
- govet - govet
- grouper - grouper
@ -104,18 +104,20 @@ linters-settings:
- BUG - BUG
- FIXME - FIXME
- HACK - HACK
gosec:
exclude-generated: true
lll: lll:
line-length: 120 line-length: 120
misspell:
locale: US
ignore-words: expect
nolintlint: nolintlint:
allow-leading-space: false allow-leading-space: false
require-explanation: true require-explanation: true
require-specific: true require-specific: true
unparam:
check-exported: true # checks exported functions and methods for unused params
misspell:
locale: US
ignore-words: expect
prealloc: prealloc:
simple: true # enables simple preallocation checks simple: true # enables simple preallocation checks
range-loops: true # enabled preallocation checks in range loops range-loops: true # enabled preallocation checks in range loops
for-loops: false # disables preallocation checks in for loops for-loops: false # disables preallocation checks in for loops
unparam:
check-exported: true # checks exported functions and methods for unused params