Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13
version: v2.15
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false
2 changes: 1 addition & 1 deletion .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13
version: v2.15
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false
23 changes: 13 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,25 @@ linters:
# Default: [ switch ]
check:
- switch
- map
- mapliteral
# Presence of "default" case in switch statements satisfies exhaustiveness,
# even if all enum members are not listed.
# Default: false
default-signifies-exhaustive: true
# Enum members matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness.
# Default: ""
ignore-enum-members: "Example.+"
ignore-constants:
- "Example.+"
# Enum types matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness.
# Default: ""
ignore-enum-types: "Example.+"
ignore-types:
- "Example.+"
# Consider enums only in package scopes, not in inner scopes.
# Default: false
package-scope-only: true
# Only run exhaustive check on switches with "//exhaustive:enforce" comment.
# Only run exhaustive check on switches and map literals with "//exhaustive:enforce" comment.
# Default: false
explicit-exhaustive-switch: true
# Only run exhaustive check on map literals with "//exhaustive:enforce" comment.
# Default: false
explicit-exhaustive-map: true
explicit-exhaustive: true
# Switch statement requires default case even if exhaustive.
# Default: false
default-case-required: true
Expand Down Expand Up @@ -409,12 +406,18 @@ linters:
arguments:
# lower this after refactoring
- 219
# new in v2.14, to enable soon
- name: marshal-receiver
disabled: true
- name: max-control-nesting
arguments:
# lower this after refactoring
- 5
- name: max-public-structs
disabled: true
# new in v2.14, to enable soon
- name: multiline-if-init
disabled: true
- name: nested-structs
disabled: true
- name: package-comments
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Say which, in the PR body.
- Lint while iterating: `golangci-lint run ./pkg/<what you changed>/...`
- Before pushing: `make lint`. It lints linux, windows and freebsd, same as CI — so expect
findings outside your change if it's platform-specific.
- Use golangci-lint v2.13, the version CI pins. Other versions report different things.
- Use golangci-lint v2.15, the version CI pins. Other versions report different things.
- Don't restructure working code to satisfy a linter that's switched off. Check the `disable:`
list in `.golangci.yml` before "fixing" something it never complained about.

Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stages:
- task: GoTool@0
displayName: "Install Go"
inputs:
version: '1.27.1'
version: '1.27.3'

- pwsh: |
choco install -y make
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/crowdsecurity/crowdsec

go 1.27.1
go 1.27.3

require (
ariga.io/atlas v1.3.0
Expand Down
Loading