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

[KAIZEN] Turn some warnings into errors #1079

Conversation

lukasz-golebiewski
Copy link
Contributor

No description provided.

Print summaries for the remaining ones
build.sbt Outdated
// https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
// cat={warning-name}:ws prints a summary with the number of warnings of the given type
// any:e turns all remaining warnings into errors
"-Wconf:cat=deprecation:ws,cat=lint-package-object-classes:ws,cat=unused:ws,cat=lint-infer-any:ws,cat=lint-byname-implicit:ws,cat=other-match-analysis:ws,any:e",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should aim to gradually make the list of cat={}:ws thinner

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's great to reduce the noise during dev. I think a way to make it display the full warning easily would be useful though. Something like an env var (but maybe there is a more elegant way):

Suggested change
"-Wconf:cat=deprecation:ws,cat=lint-package-object-classes:ws,cat=unused:ws,cat=lint-infer-any:ws,cat=lint-byname-implicit:ws,cat=other-match-analysis:ws,any:e",
if (sys.env.get("MANTIS_FULL_WARNS").contains("true"))
""
else
"-Wconf:cat=deprecation:ws,cat=lint-package-object-classes:ws,cat=unused:ws,cat=lint-infer-any:ws,cat=lint-byname-implicit:ws,cat=other-match-analysis:ws,any:e",

usage: MANTIS_FULL_WARNS=true sbt compile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, but I would be explicit and put "-Wconf:any:w" in there

@lukasz-golebiewski
Copy link
Contributor Author

Closing in favor of #1081

@lukasz-golebiewski lukasz-golebiewski deleted the kaizen/deal-with-the-warnings branch July 28, 2021 21:10
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.

None yet

3 participants