| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also clarify usage of -Xlint flag.
Align more with javac -Xlint:all,-flag,flag where once a flag is
explicitly enabled it cannot be disabled, but where the wildcard
is a backstop only. (There is no all option yet here.)
-Xlint and -Xlint:_ just set a flag which is consulted by any
unset lint warning.
Xlint warnings consult the state of Xlint when they are unset.
Individual -Ywarn-ings do not.
Other warnings are explicitly set to false. They can only be
enabled programmatically.
Some tests are corrected. Also, option order is no longer
significant, see the unit test.
|
|
|
|
|
|
|
|
|
| |
Turn anonymous references to `settings.lint` into named settings.
After that, trust to Adriaan to make them filterable.
There are a few remaining top-level -Y lint warnings that are
deprecated.
|
|
|
|
|
|
|
|
|
|
| |
Turn off lint warnings with negating prefix, and add a lint-only
warning for the infamously nagging "Did you forget the interpolator?"
That message is made more dignified.
Without `-Xlint:false`, there is no mechanism to turn off
anonymous linters once `-Xlint` is selected.
|
|
Make -Xlint a "multichoice" option for purposes of option parsing.
This allows turning on "lint with these warnings" instead of only
"turn off these warnings but enable other lint warnings".
```
$ scalac -Xlint:warn-adapted-args linty.scala # lint plus a warning
$ scalac -Xlint warn-adapted-args linty.scala # same
$ scalac -Xlint linty.scala # same as now
$ scalac -Xlint -- linty.scala # ok, not necessary
$ scalac -Xlint _ -- linty.scala # another funky underscore
```
This would also enable Xlint options that are not standalone options,
although that is not implemented in this commit. For example,
`-Xlint:no-missing-interpolator` could be used to disable that
warning. (There is no `-Xoption:flavor=off` syntax.) (`no-` switches
would not be enabled by `_`.)
|