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 prettier:write to docs and rephrase slightly [ci skip] #5831

Merged
merged 2 commits into from
May 14, 2024
Merged
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
13 changes: 10 additions & 3 deletions docs/Codestyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ it takes a bit of time, but reformat the entire codebase. Only code you have cha
formatted, since the existing code is already formatted. The second way is to set up prettier and
run it manually or hick it into your IDE, so it runs every time a file is changed.

### How to run Prittier with Maven
### How to run Prettier with Maven

Format all code is done in the validate phase (run before test, package, install)
Prettier will automatically format all code in the Maven "validate" phase, which runs before the test, package, and install phases. So formatting will happen for example when you run:

```
% mvn test
```

You can manually run _only_ the formatting process with:

```
% mvn prettier:write

```

To skip the prettier formating use profile `prettierSkip`:

```
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind @abyrd changing line 41, it is a copy&paste error there. It should be mvn test -P prettierCheck (not prettierSkip).

Everything else looks fine.

Expand All @@ -31,7 +38,7 @@ To skip the prettier formating use profile `prettierSkip`:
The check for formatting errors use profile `prettierCheck`:

```
% mvn test -P prettierSkip
% mvn test -P prettierCheck
```

The check is run by the CI server and will fail the build if the code is incorrectly formatted.
Expand Down
Loading