Add some automated tests and linting to be run on pull requests. Why? This can help build a common reference point about code failures and code style.
Implementation
This PR uses github actions that makes running such tests / linters quite easy. I added two different actions. One for linting and one for tests.
The linting action runs two linters
cljfmt - focuses on code formatting things like indentation. It can also automatically fix problems when run with lein cljfmt fix (as opposed to lein cljfmt check).
eastwood - is a linter that checks more broadly for things like missing vars, etc.
We can always modify and customize these linting tools as we see fit, but they'll help us converge on a common style that also reflects the community's preferences.
How does it work?
Basically when you open a PR the tests / and linters will run. They show up at the bottom of the PR page (i.e. this type of page), and look like this:
You can look at the logs of these actions, i.e. this is the last run of the tests on this PR.
Goal
Add some automated tests and linting to be run on pull requests. Why? This can help build a common reference point about code failures and code style.
Implementation
This PR uses github actions that makes running such tests / linters quite easy. I added two different actions. One for linting and one for tests.
The linting action runs two linters
cljfmt
- focuses on code formatting things like indentation. It can also automatically fix problems when run withlein cljfmt fix
(as opposed tolein cljfmt check
).eastwood
- is a linter that checks more broadly for things like missing vars, etc.We can always modify and customize these linting tools as we see fit, but they'll help us converge on a common style that also reflects the community's preferences.
How does it work?
Basically when you open a PR the tests / and linters will run. They show up at the bottom of the PR page (i.e. this type of page), and look like this:
You can look at the logs of these actions, i.e. this is the last run of the tests on this PR.