Don't use --quiet verbosity by default when running dylint#711
Don't use --quiet verbosity by default when running dylint#711
--quiet verbosity by default when running dylint#711Conversation
|
Why would we not want linting when using json output? Couldn't something like ink_playground use it to show linting errors to users? |
Could you explain your thinking here? How would one enable linting for A use-case is to have CI build a contract with |
|
My thinking was along the lines of our current use case in the waterfall, which doesn't really need any linting info, but I agree we should still lint contracts |
--output-json--quiet verbosity by default when running dylint
Yes. Since we build the lint now as part of the contract build (and not when building cargo contract) we get some wonky warnings during this build. I don't really want to show those warnings. They are annoying and confusing. Maybe you can set the default verbosity for linting to quiet? |
| @@ -341,7 +341,7 @@ fn exec_cargo_dylint(crate_metadata: &CrateMetadata, verbosity: Verbosity) -> Re | |||
| }; | |||
There was a problem hiding this comment.
Could do something like
let verbosity = match verbosity {
Verbosity::Verbose => Verbosity::Default,
Verbosity::Default | Verbosity::Quiet => Verbosity::Quiet
}
It looks like as part of #703 we added a
--quietflagwhen running the linter. The
--output-jsonflag also adds a--quietflag resulting ina failed run due to duplicate flags.
I figured that we probably don't want to run the linting step when running with
--output-jsonanyways, and by skipping that step we can avoidget this duplicate flagconflict in the first place.
I've instead changed this PR to not run
dylintwith--quiet, and instead it'll use the verbosityspecified by the user. In your PR, @athei, you specified
--quietruns by default. Is there anyreason for this?