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

Added note about imports to code formatting section #4450

Merged
merged 1 commit into from
Nov 20, 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
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,24 @@ Docker or remote dependencies.

To set up your development environment:
1. Open the project in [IntelliJ IDEA](https://www.jetbrains.com/idea/). Select "Import project from external model", then "Gradle".
2. To run the tests for a service, right-click the `src/test` folder in the project view and select "Run tests" (See [Test](#test)).
2. To run the tests for a service, right-click the `src/test` or `src/integrationTest` folder in the project view and
select "Run tests" (See [Test](#test)).
3. To start the service, use the pre-defined run configuration in `.idea/runConfigurations` (See [Run](#run)).

## Code formatting

Kotlin code is formatted using IntelliJ IDEA's code formatter,
which follows the [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html).

GitHub Actions will automatically fix any formatting issues when you open a pull request.
You can also use <strong title="Command">⌘</strong><strong title="Option">⌥</strong>**L** (macOS),
or **Ctrl+Alt+L** (Windows/Linux) to manually reformat your code in IntelliJ IDEA.
See [Reformat code](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html).

Note: The code formatter does not remove unused imports by default. You should
enable [Optimise on save](https://www.jetbrains.com/help/idea/creating-and-optimizing-imports.html#optimize-on-save) in
your IntelliJ IDEA settings to ensure you do not commit unused imports.

# Build
IntelliJ will automatically build your code as needed. To build using Gradle, follow the instructions below.

Expand Down Expand Up @@ -97,15 +112,6 @@ To build Docker images locally, run:
./gradlew jibDockerBuild
```

## Code formatting
Kotlin code is formatted using IntelliJ IDEA's code formatter,
which follows the [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html).

GitHub Actions will automatically fix any formatting issues when you open a pull request.
You can also use <strong title="Command">⌘</strong><strong title="Option">⌥</strong>**L** (macOS),
or **Ctrl+Alt+L** (Windows/Linux) to manually reformat your code in IntelliJ IDEA.
See [Reformat file](https://www.jetbrains.com/guide/java/tips/reformat-file/).

# Run
## IntelliJ
In IntelliJ IDEA, a Spring Boot [run configuration](https://www.jetbrains.com/help/idea/run-debug-configuration.html) is
Expand Down
Loading