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

Lint messages reported from porter should not mention mixins #2992

Merged
merged 7 commits into from
Feb 20, 2024

Conversation

kichristensen
Copy link
Contributor

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

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our [Contributors][contributors] list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: Kim Christensen <kimworking@gmail.com>
@@ -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 := ""
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@schristoff schristoff merged commit 2c17959 into getporter:main Feb 20, 2024
36 checks passed
@kichristensen kichristensen deleted the linterNoMixins branch February 21, 2024 22:41
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.

Lint messages reported from porter should not mention mixins
2 participants