terraform-provider-aiven icon indicating copy to clipboard operation
terraform-provider-aiven copied to clipboard

consider adding more linters

Open Serpentiel opened this issue 2 years ago • 1 comments

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 avatar Aug 05 '22 13:08 Serpentiel

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

rominf avatar Feb 03 '24 17:02 rominf