Path overrides

Other settings for some of the files. The default is path-overrides {}: no file gets other settings.

Each key is a glob, as those of paths, relative to the directory of the configuration file that declares it, or to the working directory for --config-string. Its section sets any setting or alias, except paths, config-version and path-overrides: those are ignored with a warning, as unknown settings are.

path-overrides {
  "path/to/file_1" {
    call-site.trailing-commas = never
  }
  "path/to/other/file_2.scala" {
    housekeeping.enforce-eof = false
  }
  "path/that/uses/**/globs/*" {
    housekeeping.line-ending = lf
  }
}

The rules

An example

A project formats the legacy sources without trailing commas and with the braces of a def forced, while the rest of the project keeps the defaults:

path-overrides {
  "src/main/scala/legacy/**" {
    call-site.trailing-commas = never
    braces.def                = force-braces
  }
}