Skip to content

Scalafix v0.5.7

Compare
Choose a tag to compare
@olafurpg olafurpg released this 07 Dec 16:56
1e59d79
  • #472 Add --diff to only report linter messages from a git diff. Useful to enable Scalafix into an existing codebase. For more details, see --diff and --diff-base in --help .

Example usage, find all vars that are introduced since scalafix v0.5.6

$ scalafix -r DisableSyntax --config-str="DisableSyntax.keywords=[var]" --diff-base=v0.5.6
scalafix-tests/unit/src/test/scala/scalafix/tests/cli/CliGitDiffTests.scala:224:13: error: [DisableSyntax.keywords.var] keywords.var is disabled
    private var revision = 0
            ^
scalafix-core/shared/src/main/scala/scalafix/internal/util/IntervalSet.scala:31:11: error: [DisableSyntax.keywords.var] keywords.var is disabled
          var i = start
          ^