diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8bf3345..625dc3e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,13 +27,19 @@ Compile the project and [run the test suite](#testing) to check everything works make all ``` - ## Testing ```shell make test ``` +## Formatting + +To format the codebase: + +```shell +make format +``` ## Releasing diff --git a/Makefile b/Makefile index c537955..17f8bc5 100644 --- a/Makefile +++ b/Makefile @@ -47,4 +47,9 @@ gh-pages: $(REBAR) test doc .PHONY: test test: $(REBAR) all @$(REBAR) eunit + @$(REBAR) fmt --check @$(REBAR) dialyzer + +.PHONY: format +format: build + @$(REBAR) fmt diff --git a/rebar.config b/rebar.config index 0e6e7e9..b74e041 100644 --- a/rebar.config +++ b/rebar.config @@ -31,5 +31,6 @@ {erlfmt, [ write, - {print_width, 140} + {print_width, 140}, + {exclude_files, ["include/DNS-ASN1.hrl", "src/DNS-ASN1.erl"]} ]}.