-
Notifications
You must be signed in to change notification settings - Fork 208
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
Lint messages reported from porter should not mention mixins #2992
Conversation
Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: Kim Christensen <kimworking@gmail.com>
pkg/linter/linter.go
Outdated
@@ -111,8 +111,12 @@ type Location struct { | |||
} | |||
|
|||
func (l Location) String() string { | |||
return fmt.Sprintf("%s: %s step in the %s mixin (%s)", | |||
l.Action, humanize.Ordinal(l.StepNumber), l.Mixin, l.StepDescription) | |||
mixin := "" |
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.
Looking at the original issue, I think the logic should be something along the lines of if the mixin name is "", we should not be returning a string. Let me know if you are reading that from #2526
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.
You are complety correct, I will work on the change
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.
@schristoff It has been changed now to align with your comment
Signed-off-by: Kim Christensen <kimworking@gmail.com>
What does this change
When porter generates a lint message directly, instead of the message coming from a mixin, we should change the message so that it doesn't print out extra "empty" text about mixins that isn't relevant.
What issue does it fix
Closes #2526
Notes for the reviewer
There is a stale PR, #2530, for the same issue.
Checklist
Reviewer Checklist