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

Add tfproviderlint linter to CI #653

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Conversation

armsnyder
Copy link
Collaborator

Adds the tfproviderlint linter to the CI workflow. This linter is used by the aws provider and others to catch common mistakes when writing Terraform providers, and will help automate code reviews. Reported issues conveniently show up as code annotations in pull requests.

I littered the code with // lintignore comments instead of fixing all of the preexisting issues, since there were so many. The intent is for newly submitted code to adhere to the linter checks, and we can resolve these past issues over time.

The full list of checks is documented here. I used the extended ruleset, but with some exceptions:

  • XAT001 - Our SDK version does not support this yet
  • XR003 - I was unsure whether custom timeouts make sense for our provider
  • XR005 - This can wait until we have auto-generated documentation set up
  • XS001 - This can wait until we have auto-generated documentation set up
  • XS002 - Personally I find it more valuable to let contributors order attributes in order of importance

Copy link
Collaborator

@mattkasa mattkasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tfproviderlint, @armsnyder, and for taking the time to go through and annotate the issues it catches with TODO 👍

LGTM, if you can resolve the conflict due to the removal of resource_gitlab_project_repository_file.go, I think we should go ahead and merge it 🚀

@armsnyder armsnyder merged commit d28c502 into gitlabhq:master Jul 15, 2021
@armsnyder armsnyder deleted the tfproviderlint branch July 15, 2021 21:03
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants