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

Simplify wart checks using scalac options #450 #422 #486 #541

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

b-gyula
Copy link

@b-gyula b-gyula commented Aug 26, 2021

  • built-in warts can be defined as scalac option just by their simple class name like Any (instead of fully qualified name)
  • new scalac option skip can be used to filter warts defined in traverser and only-warn-traverser
  • skip, traverser and only-warn-traverser scalac options can accept multiple warts as a semicolon separated list
  • new generated wart All contains all other built-in warts (except Unsafe)
  • Added description for warts GlobalExecutionContext and PlatformDefault
  • Added description for setup usage with Mill

E.g. Instead of 36 lines:

scalacOptions = Seq("-P:wartremover:only-warn-traverser:All", 
					"-P:wartremover:skip:Any;AnyVal;Var")

b-gyula and others added 2 commits August 26, 2021 02:37
… class name like `Any` (instead of fully qualified name)

- new scalac option `skip` to filter warts defined in `traverser` and `only-warn-traverser`
- `skip`, `traverser` and `only-warn-traverser` scalac option accept multiple warts as a semicolon separated list
- new generated wart `All` contains all other built-in warts
@b-gyula b-gyula requested a review from xuwei-k as a code owner August 26, 2021 00:59
@xuwei-k
Copy link
Collaborator

xuwei-k commented Sep 2, 2021

[error] /home/runner/work/wartremover/wartremover/core/src/test/scala/wartremover/PluginTest.scala:9:33: not enough arguments for method apply: (settings: scala.tools.nsc.Settings, reporter: scala.tools.nsc.reporters.Reporter)scala.tools.nsc.Global in object Global.
[error] Unspecified value parameter reporter.
[error] 		val plugin = new Plugin(Global(new Settings()))
[error] 		                              ^

https://github.com/wartremover/wartremover/runs/3437593423

…ame as `wartremover:`{simple class name} like @SuppressWarnings(Array("wartremover:Null")) (instead of fully qualified name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants