-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add .golangci.yml linter configuration #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| version: "2" | ||
|
|
||
| run: | ||
| timeout: 5m | ||
|
|
||
| linters: | ||
| default: none | ||
| enable: | ||
| - errcheck | ||
| - errorlint | ||
| - govet | ||
| - ineffassign | ||
| - gosec | ||
| - staticcheck | ||
| - unused | ||
| settings: | ||
| errorlint: | ||
| errorf: true | ||
| asserts: true | ||
| comparison: true | ||
| staticcheck: | ||
| checks: | ||
| - all | ||
| gosec: | ||
| excludes: | ||
| # Integer overflow conversion is acceptable in BPF context (e.g. mntns_id, pid). | ||
| - G115 | ||
|
Sefi4 marked this conversation as resolved.
|
||
| exclusions: | ||
| generated: lax | ||
| rules: | ||
| # Ignore check: Packages must have a package comment | ||
| - linters: | ||
| - staticcheck | ||
| text: "ST1000: at least one file in a package should have a package comment" | ||
| # Ignore rule about ID vs Id: https://github.com/golang/lint/issues/89 | ||
| - linters: | ||
| - staticcheck | ||
| text: "ST1003:" | ||
| paths: | ||
| # Exclude generated build directory | ||
| - ^build/ | ||
|
Sefi4 marked this conversation as resolved.
|
||
|
|
||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| - goimports | ||
| settings: | ||
| goimports: | ||
| local-prefixes: | ||
| - github.com/micromize-dev/micromize | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - ^build/ | ||
|
Sefi4 marked this conversation as resolved.
|
||
|
|
||
| issues: | ||
| max-issues-per-linter: 0 | ||
| max-same-issues: 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ARG IMAGE | ||
| FROM ${IMAGE} | ||
|
|
||
| # The timeout specified below is used by 'make lint'. Please keep in sync with | ||
| # the timeout specified in .golangci.yml used by the CI. | ||
| ENTRYPOINT ["golangci-lint", "run", "--timeout=5m0s"] | ||
|
Sefi4 marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,10 +3,16 @@ module github.com/micromize-dev/micromize | |
| go 1.25.5 | ||
|
|
||
| require ( | ||
| github.com/cilium/ebpf v0.20.0 | ||
| github.com/cyphar/filepath-securejoin v0.5.1 | ||
| github.com/docker/cli v29.2.0+incompatible | ||
| github.com/go-jose/go-jose/v4 v4.1.3 | ||
| github.com/inspektor-gadget/inspektor-gadget v0.49.1 | ||
| github.com/opencontainers/image-spec v1.1.1 | ||
| github.com/quay/claircore v1.5.45 | ||
| github.com/sirupsen/logrus v1.9.4 | ||
| github.com/spf13/cobra v1.10.2 | ||
| golang.org/x/sync v0.19.0 | ||
|
Comment on lines
5
to
+15
|
||
| oras.land/oras-go/v2 v2.6.0 | ||
| ) | ||
|
|
||
|
|
@@ -21,7 +27,6 @@ require ( | |
| github.com/blang/semver v3.5.1+incompatible // indirect | ||
| github.com/blang/semver/v4 v4.0.0 // indirect | ||
| github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
| github.com/cilium/ebpf v0.20.0 // indirect | ||
| github.com/cloudflare/cbpfc v0.0.0-20240920015331-ff978e94500b // indirect | ||
| github.com/containerd/cgroups/v3 v3.0.5 // indirect | ||
| github.com/containerd/containerd v1.7.30 // indirect | ||
|
|
@@ -35,10 +40,8 @@ require ( | |
| github.com/containerd/ttrpc v1.2.7 // indirect | ||
| github.com/containerd/typeurl/v2 v2.2.3 // indirect | ||
| github.com/coreos/go-systemd/v22 v22.7.0 // indirect | ||
| github.com/cyphar/filepath-securejoin v0.5.1 // indirect | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/distribution/reference v0.6.0 // indirect | ||
| github.com/docker/cli v29.2.0+incompatible // indirect | ||
| github.com/docker/docker v28.5.2+incompatible // indirect | ||
| github.com/docker/docker-credential-helpers v0.9.3 // indirect | ||
| github.com/docker/go-connections v0.6.0 // indirect | ||
|
|
@@ -98,7 +101,6 @@ require ( | |
| github.com/notaryproject/notation-plugin-framework-go v1.0.0 // indirect | ||
| github.com/notaryproject/tspclient-go v1.0.0 // indirect | ||
| github.com/opencontainers/go-digest v1.0.0 // indirect | ||
| github.com/opencontainers/image-spec v1.1.1 // indirect | ||
| github.com/opencontainers/runtime-spec v1.2.1 // indirect | ||
| github.com/opencontainers/selinux v1.13.1 // indirect | ||
| github.com/packetcap/go-pcap v0.0.0-20250723190045-d00b185f30b7 // indirect | ||
|
|
@@ -139,7 +141,6 @@ require ( | |
| golang.org/x/mod v0.31.0 // indirect | ||
| golang.org/x/net v0.49.0 // indirect | ||
| golang.org/x/oauth2 v0.33.0 // indirect | ||
| golang.org/x/sync v0.19.0 // indirect | ||
| golang.org/x/sys v0.40.0 // indirect | ||
| golang.org/x/term v0.39.0 // indirect | ||
| golang.org/x/text v0.33.0 // indirect | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,8 @@ import ( | |||||
| "os" | ||||||
| "path/filepath" | ||||||
| "testing" | ||||||
|
|
||||||
| "github.com/go-jose/go-jose/v4/testutils/require" | ||||||
|
Comment on lines
+23
to
+24
|
||||||
| "github.com/go-jose/go-jose/v4/testutils/require" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unrelated to this PR. I'll fix it in a follow-up PR
Uh oh!
There was an error while loading. Please reload this page.