-
Notifications
You must be signed in to change notification settings - Fork 680
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 flag to golangci-lint to show line number if there is error #6096
Conversation
Signed-off-by: lubronzhan <lubronzhan@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6096 +/- ##
=======================================
Coverage 78.85% 78.85%
=======================================
Files 138 138
Lines 19731 19731
=======================================
Hits 15558 15558
Misses 3870 3870
Partials 303 303 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lubronzhan! This seems the way to go, though I cannot figure out why this is not the default, as discussed at length here golangci/golangci-lint-action#119
By default golangci-lint-action runs golangci-lint with --output-format=github-action
. When user gives --out-format=colored-line-number
the format will be concatenated and result will be both --out-format=github-actions,colored-line-number
(according to golangci/golangci-lint-action#769) giving best of both worlds: annotations (annotations.png from workflow commands) as well as line numbers in logs!
Signed-off-by: Lubron Zhan <lubronzhan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #6095
Example run after adding the change in my PR
#6073
projectcontour/contour/actions/runs/7551166827/job/20557981226?pr=6073