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

Update Styleguide file #5435

Merged
merged 2 commits into from
Jan 7, 2025
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ If your PR is failing because of that, please make sure that you follow our [sty
You can also trigger an automatic code formatting of the code by executing:

```
./gradleW app:spotlessApply
./gradleW code_format_checks
./gradleW formatKotlin
```
17 changes: 5 additions & 12 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@

### Code formatting

To adhere to codestyle, please run `./gradlew spotlessApply` to autoformat in order to fix any CI issues.
You can check the code formatting correctness by running `./gradleW code_format_checks`.
To adhere to codestyle, please run `./gradleW formatKotlin` and `./gradleW spotlessApply` to autoformat in order to fix any CI issues.

If you want to do this automatically upon commit we recommend the following `pre-commit` hook.

```bash
❯ cat .git/hooks/pre-commit
./gradlew :app:spotlessApply
git add `git diff --name-only`
exit 0
```

If you want to reformat code whilst writing it, please make sure you have installed and enabled
the [IntelliJ Ktfmt plugin](https://plugins.jetbrains.com/plugin/14912-ktfmt), with Dropbox Style selected.
If you want to do this automatically upon commit we recommend the existing [pre-commit hook](.githooks/pre-commit):
- Pull develop branch
- Execute the following command `git config core.hooksPath .githooks` in the terminal

## Code conventions

Expand Down
Loading