1 Tips for contributing
tzugen edited this page 2022-06-20 10:01:28 +02:00

Hi, you want to start contributing on code or with making a PR? Great!

Here are some pointers to get you started.

Commit signing

You must enable commit signing in Git: See here how to set it up

Pull requests and CI

On each PR Github runs a number of checks to make sure there are no problems.

KtLint

This programm checks if the source code is formatted correctly. You can run it yourself locally with

./gradlew -Pqc ktlintFormat

Running this command will fix common problems and will notify you of problems it couldn't fix automatically.

Detekt

Detekt is a static analyser. It helps to find potential bugs in our code.

You can run it yourself locally with

./gradlew -Pqc detekt

There is a "baseline" file, in which errors which have been in the code base before are noted. Sometimes it is necessary to regenerate this file by running:

./gradlew -Pqc detektBaseline

Lint

Lint looks for general problems in the code or unused resources etc. You can run it with

./gradlew -Pqc lintRelease

If there is a need to regenerate the baseline, remove ultrasonic/lint-baseline.xml and rerun the command.