Skip to content

Enforcing the coding style with .editorconfig

The .editorconfig file is a way to enforce certain properties about a codebase, especially whether or not tabs should be used, the size of the indentation, the charset, etc.

In particular, it can be used to implement this section of the coding style: https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/coding-style#tabs-vs-spaces

It pretty much looks like this:


root = true

[*.hs]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[Makefile]
indent_style = tab
Edited by Hécate Kleidukos
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information