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

consider adding more linters #858

Open
1 task
Serpentiel opened this issue Aug 5, 2022 · 1 comment
Open
1 task

consider adding more linters #858

Serpentiel opened this issue Aug 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Serpentiel
Copy link
Contributor

What is currently missing?

some important linters are missing which could:

  • prevent appearance of future bugs
  • fix existing bugs
  • improve overall performance and security of the provider

How could this be improved?

add the following linters:

  • durationcheck (check for two durations multiplied together)
  • errorlint (errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.)
  • forbidigo (Forbids identifiers)
  • forcetypeassert (finds forced type assertions)
  • goconst (Finds repeated strings that could be replaced by a constant)
  • gocyclo (Computes and checks the cyclomatic complexity of functions)
  • gomnd (An analyzer to detect magic numbers.)
  • gosec (Inspects source code for security problems)
  • prealloc (Finds slice declarations that could potentially be pre-allocated)
  • typecheck (Like the front-end of a Go compiler, parses and type-checks Go code)

Is this a feature you would work on yourself?

  • I plan to open a pull request for this feature.
@Serpentiel Serpentiel added the enhancement New feature or request label Aug 5, 2022
rominf pushed a commit to rominf/terraform-provider-aiven that referenced this issue Jan 26, 2024
Add https://github.com/polyfloyd/go-errorlint to find code that will
cause problems with Go's error wrapping scheme.

This is partial implementation of aiven#858.
Serpentiel pushed a commit to rominf/terraform-provider-aiven that referenced this issue Jan 26, 2024
Add https://github.com/polyfloyd/go-errorlint to find code that will
cause problems with Go's error wrapping scheme.

This is partial implementation of aiven#858.
@rominf
Copy link
Contributor

rominf commented Feb 3, 2024

It looks like forcetypeassert is not needed: it's not developed anymore, and the same functionality is provided by errcheck.

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

No branches or pull requests

2 participants