-
Notifications
You must be signed in to change notification settings - Fork 116
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
Implement lint subcommand #42
Conversation
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 did quite a bit of progress here! I like the fact that the source code is really simple here.
cmd/lint.go
Outdated
@@ -12,11 +12,16 @@ func setupLintCommand() *cobra.Command { | |||
Short: "Lint the integration", | |||
Long: "Use lint command to lint the integration files.", | |||
RunE: lintCommandAction, | |||
SilenceUsage: true, |
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.
I wonder if there is global switch to fix these cases. Otherwise we need to mute usage for every subcommand.
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.
It might be possible to set SilenceUsage at the root command level, but I'm 100% sure based on this thread: spf13/cobra#340. I will try it out and update this PR accordingly.
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.
Fixed in 5ffd82d.
There was an issue spotted by CI:
|
This is expected to happen until elastic/package-spec#12 gets merged. |
@mtojek I think I've addressed all your feedback on this PR. It's ready for your 👀 again, when you get a chance please. Thanks! |
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.
Ship it!
This PR implements the
elastic-package lint
command.Depends on elastic/package-spec#12.
Resolves #5.