CmdID

CmdID / Commands

scalafmt

Code formatter for Scala. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Code formatter for Scala. Configurations are stored in the .scalafmt.conf file.

Reformat all .scala files in the current directory recursively

scalafmtIdentify

Reformat specific files or directories with a custom formatting configuration

scalafmt --config path/to/.scalafmt.conf path/to/file_or_directory1 path/to/file_or_directory2 ...Identify

Check if files are correctly formatted, returning 0 if all files respect the formatting style

scalafmt --config path/to/.scalafmt.conf --testIdentify

Exclude files or directories

scalafmt --exclude path/to/file_or_directory1 path/to/file_or_directory2 ...Identify

Format only files that were edited against the current Git branch

scalafmt --config path/to/.scalafmt.conf --mode diffIdentify