scalafix
scalafix (https://scalacenter.github.io/scalafix/)
Backend: pants.backend.experimental.scala.lint.scalafix
Config section: [scalafix]
Basic options
skip
--[no-]scalafix-skip
PANTS_SCALAFIX_SKIP
[scalafix]
skip = <bool>
False
If true, don't use scalafix when running pants fix
and pants lint
.
Advanced options
artifacts
--scalafix-artifacts="['<str>', '<str>', ...]"
PANTS_SCALAFIX_ARTIFACTS
[scalafix]
artifacts = [
'<str>',
'<str>',
...,
]
[ "ch.epfl.scala:scalafix-cli_2.13.12:{version}" ]
Artifact requirements for this tool using specified as either the address of a jvm_artifact
target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version
). For Maven coordinates, the string {version}
version will be substituted with the value of the [scalafix].version
option.
config_file_name
--scalafix-config-file-name=<str>
PANTS_SCALAFIX_CONFIG_FILE_NAME
[scalafix]
config_file_name = <str>
.scalafix.conf
Name of a config file understood by scalafix (https://scalacenter.github.io/scalafix/docs/users/configuration.html). The plugin will search the ancestors of each directory in which Scala files are found for a config file of this name.
jvm_options
--scalafix-jvm-options="['<str>', '<str>', ...]"
PANTS_SCALAFIX_JVM_OPTIONS
[scalafix]
jvm_options = [
'<str>',
'<str>',
...,
]
[]
List of JVM options to pass to scalafix
JVM processes.
Options set here will be added to those set in [jvm].global_options
. Please check the documentation for the jvm
subsystem to see what values are accepted here.
lockfile
--scalafix-lockfile=<str>
PANTS_SCALAFIX_LOCKFILE
[scalafix]
lockfile = <str>
<default>
Path to a lockfile used for installing the tool.
Set to the string <default>
to use a lockfile provided by Pants, so long as you have not changed the --version
option. See https://github.com/pantsbuild/pants/blob/release_2.23.0rc2/src/python/pants/backend/scala/lint/scalafix/scalafix.default.lockfile.txt for the default lockfile contents.
To use a custom lockfile, set this option to a file path relative to the build root, then run pants jvm-generate-lockfiles --resolve=scalafix
.
orphan_files_behavior
--scalafix-orphan-files-behavior=<OrphanFilepathConfigBehavior>
PANTS_SCALAFIX_ORPHAN_FILES_BEHAVIOR
[scalafix]
orphan_files_behavior = <OrphanFilepathConfigBehavior>
ignore, error, warn
default:
error
Whether to ignore, error or show a warning when files are found that are not covered by the config file provided in [scalafix].config_file_name
setting.
rule_targets
--scalafix-rule-targets="['<str>', '<str>', ...]"
PANTS_SCALAFIX_RULE_TARGETS
[scalafix]
rule_targets = [
'<str>',
'<str>',
...,
]
[]
List of targets providing additional Scalafix rules.
semantic_rules
--[no-]scalafix-semantic-rules
PANTS_SCALAFIX_SEMANTIC_RULES
[scalafix]
semantic_rules = <bool>
True
Whether semantic rules are enabled or not.
Using semantic rules requires the usage of the semanticdb-scalac
plugin and will trigger compilation of the source code before running scalafix on the sources.
version
--scalafix-version=<str>
PANTS_SCALAFIX_VERSION
[scalafix]
version = <str>
0.11.1
Version string for the tool. This is available for substitution in the [scalafix].artifacts
option by including the string {version}
.
Deprecated options
None
Related subsystems
None