Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
187 changes: 76 additions & 111 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,35 @@
---
version: "2"
run:
concurrency: 6
build-tags:
- netgo
- e2e
concurrency: 6
deadline: 5m
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- err113
- errcheck
- errorlint
- exhaustive
- exportloopref
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
# TODO(jaosorior): Re-Add later
#- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- golint
- gomnd
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- interfacer
- lll
- maligned
- misspell
- mnd
- nakedret
- nestif
- noctx
Expand All @@ -52,101 +38,80 @@ linters:
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wrapcheck
# - exhaustivestruct
# - funlen
# - gochecknoglobals
# - nlreturn
# - scopelint
# - testpackage
# - wsl
linters-settings:
gci:
local-prefixes: containers/selinuxd
errcheck:
check-type-assertions: true
check-blank: true
godox:
keywords:
- BUG
- FIXME
- HACK
gocritic:
enabled-checks:
# Diagnostic
- appendAssign
- argOrder
- badCond
- caseOrder
- codegenComment
- commentedOutCode
- deprecatedComment
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- exitAfterDefer
- flagDeref
- flagName
- nilValReturn
- offBy1
- sloppyReassign
- weakCond
- octalLiteral

# Performance
- appendCombine
- equalFold
- hugeParam
- indexAlloc
- rangeExprCopy
- rangeValCopy

# Style
- assignOp
- boolExprSimplify
- captLocal
- commentFormatting
- commentedOutImport
- defaultCaseOrder
- docStub
- elseif
- emptyFallthrough
- emptyStringTest
- hexLiteral
- ifElseChain
- methodExprCall
- regexpMust
- singleCaseSwitch
- sloppyLen
- stringXbytes
- switchTrue
- typeAssertChain
- typeSwitchVar
- underef
- unlabelStmt
- unlambda
- unslice
- valSwap
- wrapperFunc
- yodaStyleExpr

# Opinionated
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnamedResult
- unnecessaryBlock
settings:
errcheck:
check-type-assertions: true
check-blank: true
gocritic:
enabled-checks:
- commentedOutCode
- nilValReturn
- sloppyReassign
- weakCond
- octalLiteral
- appendCombine
- equalFold
- hugeParam
- indexAlloc
- rangeExprCopy
- rangeValCopy
- boolExprSimplify
- commentedOutImport
- docStub
- emptyFallthrough
- emptyStringTest
- hexLiteral
- methodExprCall
- stringXbytes
- typeAssertChain
- unlabelStmt
- yodaStyleExpr
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnamedResult
- unnecessaryBlock
godox:
keywords:
- BUG
- FIXME
- HACK
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- Standard
- Default
- Prefix(containers/selinuxd)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GO_PROJECT := github.com/containers/$(PROJECT)

# External Helper variables

GOLANGCI_LINT_VERSION=1.50.1
GOLANGCI_LINT_VERSION=2.1.2
GOLANGCI_LINT_OS=linux
ifeq ($(OS_NAME), Darwin)
GOLANGCI_LINT_OS=darwin
Expand Down
63 changes: 30 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
module github.com/containers/selinuxd

go 1.19
go 1.23.0

toolchain go1.23.8

require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/fsnotify/fsnotify v1.6.0
github.com/go-chi/chi/v5 v5.0.8
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.4
github.com/fsnotify/fsnotify v1.9.0
github.com/go-chi/chi/v5 v5.2.1
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/mitchellh/go-homedir v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.8
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.17.0
go.etcd.io/bbolt v1.3.7
go.uber.org/zap v1.24.0
github.com/onsi/ginkgo/v2 v2.23.4
github.com/onsi/gomega v1.37.0
github.com/spf13/cobra v1.9.1
github.com/spf13/viper v1.20.1
go.etcd.io/bbolt v1.4.0
go.uber.org/zap v1.27.0
)

require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20250418163039-24c5476c6587 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.9.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/afero v1.14.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
golang.org/x/tools v0.32.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading