Forrest logo
tool overview
On this page you find all important commands for the CLI tool brittany. If the command you are looking for is missing please ask our AI.

brittany

Brittany is a command line tool for automated formatting of Haskell source code. It is designed to improve code readability and consistency by automatically applying specific formatting rules. Brittany can be used to format individual Haskell files or entire projects, making it easier to maintain a clean and well-organized codebase.

Some key features of Brittany include:

  1. Automatic formatting: Brittany applies a set of opinionated formatting rules to your Haskell code, ensuring consistent styles throughout your project. It can automatically adjust indentation, line breaks, and whitespace.

  2. Customization: While Brittany comes with its own set of default formatting rules, it also allows you to customize these rules according to your own preferences. You can modify the indentation width, line length limits, and various other formatting options.

  3. Integration: Brittany can be integrated into various development workflows and build systems. It can be used as a standalone tool from the command line or integrated with editors and IDEs like Emacs, Vim, and VSCode.

  4. Git-friendly: Brittany is designed to work well with code versioning systems like Git. It aims to produce minimal diffs when formatting changes are applied, making it easier to review and manage code changes within a team.

Overall, Brittany is a powerful and convenient tool for automating the formatting of Haskell code, helping developers maintain consistent coding styles and improving code readability.

List of commands for brittany:

  • brittany:tldr:1ed4f brittany: Format a Haskell source file using the specified amount of spaces per indentation level and line length.
    $ brittany --indent ${4} --columns ${100} ${filename-hs}
    try on your machine
    explain this command
  • brittany:tldr:91970 brittany: Check whether a Haskell source file needs changes and indicate the result through the programme's exit code.
    $ brittany --check-mode ${filename-hs}
    try on your machine
    explain this command
  • brittany:tldr:c8cf4 brittany: Format a Haskell source file and print the result to `stdout`.
    $ brittany ${filename-hs}
    try on your machine
    explain this command
  • brittany:tldr:ea778 brittany: Format all Haskell source files in the current directory in-place.
    $ brittany --write-mode=inplace ${*-hs}
    try on your machine
    explain this command
  • brittany:tldr:f886f brittany: Format a Haskell source file according to the style defined in the specified config file.
    $ brittany --config-file ${path-to-config-yaml} ${filename-hs}
    try on your machine
    explain this command
tool overview