Skip to content
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

Fix version of golangci-lint #1009

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

adrianchiris
Copy link
Contributor

currently the workflow will use latest
version which is a moving target.

newer versions may cause ci failures due
to new checks added.

currently the workflow will use latest
version which is a moving target.

newer versions may cause ci failures due
to new checks added.

Signed-off-by: adrianc <adrianc@nvidia.com>
@adrianchiris
Copy link
Contributor Author

adrianchiris commented Feb 13, 2024

Example run on main branch with golangci-lint 1.56.1 (which was released a few days ago):

$ docker run --rm -v $(p
wd):/app -w /app golangci/golangci-lint:v1.56.1 golangci-lint run -v
level=info msg="[config_reader] Config search paths: [./ /app / /root]"
level=info msg="[config_reader] Used config file .golangci.yml"
level=info msg="[lintersdb] Active 18 linters: [contextcheck durationcheck gci ginkgolinter gocritic gofumpt gosimple govet ineffassign misspell nonamedreturns predeclared revive staticcheck unconvert unparam unused wastedassign]"
level=info msg="[loader] Go packages loading at mode 575 (exports_file|files|name|types_sizes|compiled_files|deps|imports) took 13.015389872s"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 24.441516ms"
level=info msg="[linters_context/goanalysis] analyzers took 2m5.23978475s with top 10 stages: buildir: 30.852740276s, buildssa: 10.34766137s, wastedassign: 10.290351335s, the_only_name: 10.098184443s, unparam: 3.534524563s, gocritic: 3.016104395s, gofumpt: 2.996833309s, misspell: 2.490761523s, gci: 2.10147502s, S1038: 1.789768904s"
level=info msg="[runner/max_same_issues] 11/14 issues with text \"unused-parameter: parameter 'netNS' seems to be unused, consider removing or renaming it as _\" were hidden, use --max-same-issues"
level=info msg="[runner/max_same_issues] 7/10 issues with text \"File is not `gofumpt`-ed\" were hidden, use --max-same-issues"
level=info msg="[runner/max_same_issues] 2/5 issues with text \"unused-parameter: parameter 'n' seems to be unused, consider removing or renaming it as _\" were hidden, use --max-same-issues"
level=info msg="[runner] Issues before processing: 324, after processing: 9"
level=info msg="[runner] Processors filtering stat (out/in): uniq_by_line: 29/29, path_shortener: 9/9, severity-rules: 9/9, filename_unadjuster: 324/324, skip_dirs: 324/324, exclude-rules: 32/324, max_from_linter: 9/9, path_prettifier: 324/324, identifier_marker: 324/324, nolint: 29/32, source_code: 9/9, path_prefixer: 9/9, cgo: 324/324, autogenerated_exclude: 324/324, exclude: 324/324, diff: 29/29, max_per_file_from_linter: 29/29, max_same_issues: 9/29, fixer: 9/9, sort_results: 9/9, skip_files: 324/324"
level=info msg="[runner] processing took 146.409956ms with stages: autogenerated_exclude: 95.452153ms, nolint: 22.711874ms, source_code: 9.860602ms, exclude-rules: 8.105378ms, identifier_marker: 7.926064ms, path_prettifier: 1.609905ms, skip_dirs: 452.601µs, max_same_issues: 153.366µs, cgo: 68.903µs, filename_unadjuster: 34.333µs, uniq_by_line: 12.682µs, path_shortener: 8.754µs, max_from_linter: 5.794µs, max_per_file_from_linter: 3.068µs, fixer: 881ns, severity-rules: 846ns, sort_results: 777ns, diff: 616ns, path_prefixer: 474ns, skip_files: 444ns, exclude: 441ns"
level=info msg="[runner] linters took 7.382723065s with stages: goanalysis_metalinter: 7.236036046s"
plugins/main/dummy/dummy.go:139: File is not `gofumpt`-ed (gofumpt)

plugins/main/dummy/dummy.go:168: File is not `gofumpt`-ed (gofumpt)

plugins/meta/sbr/main.go:69: File is not `gofumpt`-ed (gofumpt)

plugins/main/dummy/dummy_test.go:374:27: unused-parameter: parameter 'netNS' seems to be unused, consider removing or renaming it as _ (revive)
                        _ = originalNS.Do(func(netNS ns.NetNS) error {
                                               ^
plugins/main/vlan/vlan_test.go:502:29: unused-parameter: parameter 'netNS' seems to be unused, consider removing or renaming it as _ (revive)
                                        _ = originalNS.Do(func(netNS ns.NetNS) error {
                                                               ^
plugins/main/vlan/vlan_test.go:523:29: unused-parameter: parameter 'netNS' seems to be unused, consider removing or renaming it as _ (revive)
                                        _ = originalNS.Do(func(netNS ns.NetNS) error {
                                                               ^
plugins/meta/bandwidth/bandwidth_linux_test.go:205:27: unused-parameter: parameter 'n' seems to be unused, consider removing or renaming it as _ (revive)
                                Expect(hostNs.Do(func(n ns.NetNS) error {
                                                      ^
plugins/meta/bandwidth/bandwidth_linux_test.go:274:27: unused-parameter: parameter 'n' seems to be unused, consider removing or renaming it as _ (revive)
                                Expect(hostNs.Do(func(n ns.NetNS) error {
                                                      ^
plugins/meta/bandwidth/bandwidth_linux_test.go:341:27: unused-parameter: parameter 'n' seems to be unused, consider removing or renaming it as _ (revive)
                                Expect(hostNs.Do(func(n ns.NetNS) error {
                                                      ^
level=info msg="File cache stats: 144 entries of total size 998.0KiB"
level=info msg="Memory: 206 samples, avg is 311.5MB, max is 1826.8MB"
level=info msg="Execution took 20.434443709s"

@adrianchiris
Copy link
Contributor Author

@squeed @dcbw can we get this one merged so it unblocks CI checks on other PRs ?

@squeed squeed merged commit 976edfe into containernetworking:main Mar 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants