CodeNarc
The CodeNarc tool analyzes Groovy code for defects, bad practices, inconsistencies, style issues and more.
This Docker image runs the CodeNarc command-line interface. See CodeNarc - Run From Command-Line for details of command-line options and parameters.
Usage
This Docker image runs CodeNarc agains the /ws directory, so these commands mount the current directory to /ws. These commands also run the image with the current user, to avoid permission issues on file access and creation.
Use all CodeNarc defaults
docker run --rm -v `pwd`:/ws --user `id -u`:`id -g` codenarc/codenarc
Specify a ruleset file
docker run --rm -v `pwd`:/ws --user `id -u`:`id -g` codenarc/codenarc -rulesetfiles=file:codenarc.ruleset
Write out violations report as text to stdout
docker run --rm -v `pwd`:/ws --user `id -u`:`id -g` codenarc/codenarc -rulesetfiles=file:codenarc.ruleset -report=text:stdout