First, install the project's pre-commit hooks (do this immediately after cloning!)
./gradlew install_hooks
Pre-commit hooks are programs that check the files you've changed each time you make a new commit. They will prevent you from checking in things like invalid JSON, code that fails the Kotlin linter, and more.
To test your code, run:
./gradlew test
Test frequently and always test before deploying code to a roboRIO. Running tests will also run pre-commit on all of the files in the repo.
To deploy your code, run:
./gradlew deploy
detekt helps catch common code smells in your program. If you encounter a false positive, you have two options:
- Suppress the issue using the @Suppress annotation
- Disable the issue across the whole project. To do this, you'll need to edit
.detekt-config.yml
as desired.