Skip to content

Commit

Permalink
Add "make format" and check formatting in CI (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide authored Oct 21, 2024
1 parent a9073c7 commit 917af7e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@

{erlfmt, [
write,
{print_width, 140}
{print_width, 140},
{exclude_files, ["include/DNS-ASN1.hrl", "src/DNS-ASN1.erl"]}
]}.

0 comments on commit 917af7e

Please sign in to comment.