[MAINT]: Introduce stricter linter rules for new code#3430
Conversation
|
👋 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 |
There was a problem hiding this comment.
Pull request overview
This PR separates baseline linting from stricter linting so new code can be held to higher standards without first fixing the entire existing codebase.
Changes:
- Adds a strict golangci-lint overlay enabling
forcetypeassert. - Adds Makefile targets for merged strict config generation and strict/new lint checks.
- Splits CI linting into dedicated parallel jobs using
golangci-lint-action.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
GNUmakefile |
Adds generated merged lint config target plus strict/new lint targets. |
.golangci.strict.yml |
Defines stricter lint rules for new code. |
.gitignore |
Ignores the generated merged golangci-lint config. |
.github/workflows/ci.yaml |
Moves linting into separate CI jobs and updates aggregate checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ion` to add inline annotations to PRs 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>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
675d173 to
fad1dc5
Compare
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
There is no need to run `lint-new` on main Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
|
@stevehipwell addressed Copilot comments @robert-crandall could you please review this PR? :) |
Before the change?
After the change?
make lintcheck-newto run stricter linters on only code since HEAD ofmainmake lintcheck-strictto run stricter linters on whole codebaseci.yamlworkflow, to run linters in parallel usinggolangci-lint-actionPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!