Skip to content
Closed
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
23 changes: 20 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,51 @@ which will open the workspace in IntelliJ IDEA using JetBrains Gateway.

### Linting

For linting we use a number of tools:
For linting we use a number of tools.

Backend:

- [checkstyle](https://checkstyle.sourceforge.io/)
- [spotbugs](https://github.com/spotbugs/spotbugs)
- [spotless](https://github.com/diffplug/spotless)

Frontend:

- [eslint](https://eslint.org/)
- [prettier](https://prettier.io/)
- [spotless](https://github.com/diffplug/spotless)
- [stylelint](https://stylelint.io/)

These are all configured to run as part of the Maven build, although they will be skipped if you are building with the `quick-build` profile.

To automatically fix backend issues, run:

#### spotless

```sh
mvn spotless:apply
```


#### yarn

To view frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
yarn lint
```

To fix frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:
To automatically fix frontend issues, run:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to adding Node and Yarn was intentionally added for the benefit of developers like me that mostly work in backend code. I don't have Node and Yarn in my path usually and the link helps me find the extra steps that I need to use on those rare times when I need to run yarn lint:fix

More discussion of the reason for that phrasing is in:

Suggested change
To automatically fix frontend issues, run:
To fix frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:


```sh
yarn lint:fix
```

#### prettier

```sh
prettier --write .
```

## Testing changes

Jenkins core includes unit and functional tests as a part of the repository.
Expand Down
Loading