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

Tech Debt: Enable staticcheck S1017 Check #7240

Closed
3 tasks done
bflad opened this issue Jan 22, 2019 · 2 comments · Fixed by #7520
Closed
3 tasks done

Tech Debt: Enable staticcheck S1017 Check #7240

bflad opened this issue Jan 22, 2019 · 2 comments · Fixed by #7520
Assignees
Labels
linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@bflad
Copy link
Contributor

bflad commented Jan 22, 2019

Description

Recently a few Go language linting tools (e.g. gosimple and unused) have merged into staticcheck. When switching our linting setup to the new combined linter, there are new default checks that began failing. We have explicitly disabled these in a root level staticcheck.conf until the fixes can be addressed and acceptance tested.

e.g.

aws/resource_aws_route53_zone.go:468:2:warning: should replace this if statement with an unconditional strings.TrimPrefix (S1017) (staticcheck)

Definition of Done

  • All S1017 linting errors from staticcheck are addressed
  • The -S1017 line in staticcheck.conf is removed
  • TravisCI and existing acceptance tests for affected code are passing

References

@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. provider Pertains to the provider itself, rather than any interaction with AWS. labels Jan 22, 2019
bflad added a commit that referenced this issue Jan 22, 2019
Some tools like gosimple, megacheck, and unused were folded into a single, new tool called staticcheck. Support for the old tools was recently removed in gometalinter. Here we re-enable the previous linting checks while skipping new failures until they can be addressed in the future.

New Technical Debt Issues:
* Enable staticcheck SA1006 Check: #7229
* Enable staticcheck SA1019 Check: #7230
* Enable staticcheck SA4006 Check: #7231
* Enable staticcheck SA4010 Check: #7232
* Enable staticcheck SA5007 Check: #7233
* Enable staticcheck SA6000 Check: #7234
* Enable staticcheck SA6005 Check: #7235
* Enable staticcheck SA9003 Check: #7236
* Enable staticcheck ST1000 Check: Skipped for now, can revisit in the future
* Enable staticcheck ST1003 Check: Skipped for now, can revisit in the future
* Enable staticcheck ST1005 Check: Skipped for now, can revisit in the future
* Enable staticcheck ST1006 Check: #7237
* Enable staticcheck ST1008 Check: #7238
* Enable staticcheck ST1012 Check: Skipped for now, can revisit in the future
* Enable staticcheck ST1017 Check: #7239
* Enable staticcheck S1017 Check: #7240
* Enable staticcheck S1020 Check: #7241
@tracypholmes tracypholmes self-assigned this Jan 29, 2019
@nywilken
Copy link
Contributor

nywilken commented Feb 13, 2019

Closed via #7520

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
@breathingdust breathingdust added the linter Pertains to changes to or issues with the various linters. label Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants