Scalastyle examines your Scala code and indicates potential problems with it.

Place the config file in <root> or <root>/.idea or <root>/project directory.
Config file name can be scalastyle-config.xml or scalastyle_config.xml. Configs for test sources can be overridden by scalastyle-test-config.xml or scalastyle_test_config.xml.

Full documentation is available on the Scalastyle website.