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

fix linter issue #99

Merged
merged 4 commits into from
Mar 7, 2024
Merged

fix linter issue #99

merged 4 commits into from
Mar 7, 2024

Conversation

jelenazivovic
Copy link
Contributor

@jelenazivovic jelenazivovic commented Mar 6, 2024

In the linter reusable workflow there is an option only-new-issues which is set to true which means that only new issues will be reported if it’s a pull request.
But this option generates golangci-lint command using —new-from-patch option which will make linter to skip the issues if they are not reported as the same line as the changes (it uses git diff, the issue is described here: https://golangci-lint.run/usage/faq/#why---new-from-rev-or---new-from-patch-dont-seem-to-be-working-in-some-cases).

As a fix, we have added new input for linter reusable workflow enable_whole_files which, if set to true, includes —whole-files option which makes linter to show the issues in any part of files that are updated. This may lead for some old issues that weren’t reported before to be reported now, but teams can set it to false if they don't want to deal with it right now.

@jelenazivovic jelenazivovic marked this pull request as ready for review March 6, 2024 12:25
@jelenazivovic jelenazivovic force-pushed the jz_enableWholeFilesInLint branch from c81080c to dcebb00 Compare March 6, 2024 15:19
@jelenazivovic jelenazivovic merged commit 9ca1b72 into main Mar 7, 2024
1 check passed
@jelenazivovic jelenazivovic deleted the jz_enableWholeFilesInLint branch March 7, 2024 09:24
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.

3 participants