Skip to content

Official presets should not contain deprecated linters #3404

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

Closed
4 tasks done
Hades32 opened this issue Dec 7, 2022 · 2 comments · Fixed by #3405
Closed
4 tasks done

Official presets should not contain deprecated linters #3404

Hades32 opened this issue Dec 7, 2022 · 2 comments · Fixed by #3405
Labels
enhancement New feature or improvement

Comments

@Hades32
Copy link

Hades32 commented Dec 7, 2022

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

I'm getting the following warnings although I haven't enabled those linters specifically as I'm only using presets (see below)

WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  Replaced by govet 'fieldalignment'.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.

Version of golangci-lint

$ golangci-lint version
golangci-lint has version v1.50.1 built from (unknown, mod sum: "h1:C829clMcZXEORakZlwpk7M4iDw2XiwxxKaG504SZ9zY=") on (unknown)

Configuration file

run:
  timeout: 2m
  skip-files:
    - ".*_test.go"
linters:
  presets:
    - bugs
    - error
    - module
    - performance
    - unused
  disable:
    - wrapcheck
issues:
  exclude:
    - RunInBackground.*should pass the context parameter
    - resolveUseARNRegion.*should pass the context parameter
    - '`Do` should pass the context parameter'
    - resolveUseFIPSEndpoint
  exclude-rules:
    # we're using SHA1 just for a short content hash
    - path: http_server
      text: "weak cryptographic primitive"
      linters:
        - gosec

Go environment

$ go version && go env
go version go1.19 linux/amd64

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here
INFO [config_reader] Config search paths: [./ /home/h32/ut/TangiaMonoAPI /home/h32/ut /home/h32 /home /] 
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 35 linters: [asasalint asciicheck bidichk bodyclose contextcheck deadcode depguard durationcheck errcheck errchkjson errorlint exhaustive exportloopref goerr113 gomoddirectives gomodguard gosec govet ineffassign loggercheck makezero maligned nilerr noctx prealloc reassign rowserrcheck scopelint sqlclosecheck staticcheck structcheck typecheck unparam unused varcheck]
INFO [lintersdb] Active presets: [bugs error module performance unused]
INFO [loader] Go packages loading at mode 575 (files|imports|name|types_sizes|compiled_files|deps|exports_file) took 472.185832ms 
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.  Replaced by govet 'fieldalignment'.
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
WARN [runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner.  Replaced by exportloopref.
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 12.441128ms 
INFO [linters_context/goanalysis] analyzers took 2m3.400788476s with top 10 stages: buildir: 47.779612913s, buildssa: 39.672439543s, inspect: 4.040366484s, fact_deprecated: 3.66813873s, exhaustive: 3.367314567s, ctrlflow: 2.298656049s, printf: 1.652494977s, bidichk: 1.620853675s, nilness: 1.355479212s, typedness: 1.066299923s
WARN [linters_context] rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters_context] sqlclosecheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters_context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
INFO [runner] Issues before processing: 74, after processing: 0
INFO [runner] Processors filtering stat (out/in): filename_unadjuster: 74/74, identifier_marker: 28/28, skip_files: 40/74, exclude: 28/28, cgo: 74/74, skip_dirs: 40/40, autogenerated_exclude: 28/40, exclude-rules: 4/28, nolint: 0/4, path_prettifier: 74/74
INFO [runner] processing took 3.593626ms with stages: nolint: 2.391178ms, identifier_marker: 329.194µs, path_prettifier: 255.94µs, exclude-rules: 207.75µs, autogenerated_exclude: 195.063µs, exclude: 84.957µs, skip_files: 63.419µs, skip_dirs: 48.374µs, cgo: 7.808µs, filename_unadjuster: 3.855µs, max_same_issues: 1.898µs, uniq_by_line: 1.163µs, diff: 770ns, max_from_linter: 529ns, path_shortener: 396ns, source_code: 384ns, sort_results: 335ns, severity-rules: 296ns, max_per_file_from_linter: 218ns, path_prefixer: 99ns
INFO [runner] linters took 12.574201432s with stages: goanalysis_metalinter: 12.5703768s, sqlclosecheck: 23.685µs, rowserrcheck: 22.948µs, structcheck: 20.108µs
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 131 samples, avg is 633.6MB, max is 976.9MB
INFO Execution took 13.134000255s

Code example or link to a public repository

// add your code here
@Hades32 Hades32 added the bug Something isn't working label Dec 7, 2022
@ldez ldez added enhancement New feature or improvement and removed bug Something isn't working labels Dec 7, 2022
@ldez
Copy link
Member

ldez commented Dec 7, 2022

Hello,

FYI, the presets are more groups based on "tags" than real presets.

@Hades32
Copy link
Author

Hades32 commented Dec 8, 2022

Thanks for taking care of it anyway:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants