Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "make format" and check formatting in CI #41

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]}
]}.