Skip to content

Commit 0eef2c4

Browse files
Addational information
Adding information to the contributing guidelines about the static analysis tooling.
1 parent 49428cf commit 0eef2c4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,37 @@ Continuous integration is automated through Jenkins:
370370
The bot runs on all commits during the PRE process,
371371
as well as handles merges. Use the `$$merge$$` comment to land PR's.
372372

373+
374+
Static Analysis
375+
---------------
376+
377+
Static Analysis of the code is provided by [gometalinter](https://github.com/alecthomas/gometalinter).
378+
379+
The Static Analysis runs every linter in parallel over the juju code base with
380+
the aim to spot any potential errors that should be resolved. As a default all
381+
the linters are disabled and only a selection of linters are run on each pass.
382+
The linters that are run, are known to pass with the state of the current code
383+
base.
384+
385+
You can independantly run the linters on the code base to validate any issues
386+
before committing or pushing using the following command from the root of the
387+
repo:
388+
389+
```shell
390+
./scripts/gometalinter.bash
391+
```
392+
393+
If you already have the git hook installed for pre-pushing, then the linters
394+
will also run during that check.
395+
396+
Adding new linters can be done, by editing the `./scripts/gometalinter.bash`
397+
file to also including/removing the desired linters.
398+
399+
Additionally to turn off the linter check for pushing or verifying then
400+
setting the environment variable `IGNORE_GOMETALINTER` before hand will cause
401+
this to happen.
402+
403+
373404
Community
374405
=========
375406

0 commit comments

Comments
 (0)