Skip to content

[MAINT] Create custom golangci-lint to integrate tfproviderlint#3254

Open
deiga wants to merge 17 commits intointegrations:mainfrom
F-Secure-web:use-custom-golangci-lint-for-tfproviderlint
Open

[MAINT] Create custom golangci-lint to integrate tfproviderlint#3254
deiga wants to merge 17 commits intointegrations:mainfrom
F-Secure-web:use-custom-golangci-lint-for-tfproviderlint

Conversation

@deiga
Copy link
Collaborator

@deiga deiga commented Mar 4, 2026

Before the change?

  • Not able to use tfproviderlint as part of golangci-lint

After the change?

  • Capable to use tfproviderlint as part of golangci-lint
  • Capable of adding new checks for the terraform provider schema
    • Example: tools/tfproviderlint/checks/L001/L001.go
  • Add 3 custom linter rules
    • L001: Instructs to use ValidateDiagFunc instead of ValidateFunc
    • L002: Instructs to use Context-aware CRUD functions
    • L003: Instructs to not call any CRUD functions directly
  • Enable all tfproviderlint checks, which seem sensible and don't require fixes right now
  • Add make lint-new to run stricter linters on only code since main
  • Refactor ci.yaml workflow, to run linters in parallel using golangci-lint-action
    • This enables inline linter complaints in PRs

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@deiga deiga force-pushed the use-custom-golangci-lint-for-tfproviderlint branch from cec47f0 to 7f284d2 Compare March 4, 2026 22:21
deiga added 13 commits March 15, 2026 20:37
To enable adding `tfproviderlint` as a plugin

Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@deiga deiga force-pushed the use-custom-golangci-lint-for-tfproviderlint branch from 4e23dc1 to 82c95b3 Compare March 15, 2026 18:38
@deiga deiga marked this pull request as ready for review March 15, 2026 18:38
deiga added 4 commits March 15, 2026 21:01
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant