Skip to content

team5499/frc2018Kotlin

Repository files navigation

frc2018Kotlin

Build Status Code Coverage

Getting started

Pre-commit

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.

Testing

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.

Deploying

To deploy your code, run:

./gradlew deploy

Troubleshooting

False positives from the detekt-wrapper hook

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 tell detekt to use a configuration file. Apply the following change to .pre-commit-config.yaml:
    --- a/.pre-commit-config.yaml
    +++ b/.pre-commit-config.yaml
    @@ -13,7 +14,9 @@ repos:
             args: [--autofix]
         - id: trailing-whitespace
     -   repo: https://github.com/team5499/pre-commit-hooks
         rev: v0.3.1
         hooks:
         -   id: ktlint-wrapper
         -   id: detekt-wrapper
    +        args: [--config .detekt-config.yml]
    Then save the default detekt configuration as .detekt-config.yml and edit it as desired.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages