Want to customize the various linters Stickler CI uses? This page contains reference documentation on how to customize each of the tools that Stickler offers.
If you're still looking for answers, please tweet us @sticklerci or email us at email@example.com.
Stickler CI is configured through a
yaml file in your repository. This
yaml file controls which linters are enabled and what their options are.
.stickler.yml file in the root directory of your project. An example file is
linters: flake8: jscs: config: './jscs.config' csslint: files: ignore: ['src/generated/*', 'webroot/bower_components/*']
In this example we've enabled
csslint. We are using a custom config file for jscs, and have ignored all files in
In addition to configuring specific linters, you can also configure how Stickler CI inspects your code:
filessection lets you define which files should be excluded from all checks. It is a newline separated list of files that accept glob patterns like
branchessection lets you define branches that Stickler CI will ignore. You can use this option to disable reviews when a pull request is against a particular set of branches.
An example of the above config options would be:
files: ignore: ['src/generated/*.py', 'webroot/bower_components/*'] branches: ignore: ['wip', 'feedback']
The above would not review any pull requests against the
feedback branches, and also ignore any
src/generated and all files in
A number of languages have de-facto linters in use. To save you having to always enable these linters, Stickler CI
provides a base configuration file for every repository. The default configuration enables
flake8. It also ignores files in
If you want to disable one of the default linters, you can do so using the
linters: flake8: enable: false
The above would disable the
flake8 linter which is enabled by default.
Check CSS files with csslint.
Both warnings and errors will be turned into code review comments. If you
don't want code review comments for specific rules, you should ignore them via
ignoreA comma separated list of rule ids to ignore.
linters: csslint: ignore: 'box-model,ids'
Check sass and scss files with sass-lint.
ignoreA comma separated list of files to ignore.
configProject relative path to the sass-lint config file you want applied.
linters: sasslint: config: ./sasslint.conf ignore: vendor/*.scss
configProvide a path to the json config file for JSCS.
presetSet which JSCS preset you want to use. Unused if
linters: jscs: config: './jscs.config'
configProvide a path to the json config file for jshint.
linters: jshint: config: './jshint.config'
configProvide a path to the json config file for eslint.
linters: eslint: config: './eslint.config'
Stickler-CI offers the following ESLint presets:
If there is a preset you'd like to see support for drop us a line.
Check Python code with flake8.
ignoreSet which pep8 error codes you wish to ignore.
excludeExclude files or directories which match these comma separated patterns (default: .svn, CVS, .bzr, .hg, .git)
filenameWhen parsing directories, only check filenames matching these comma separated patterns (default:
selectSelect errors and warnings (e.g. E,W6)
max-line-lengthSet maximum allowed line length (default: 79)
formatSet the error format [default|pylint|
max-complexityMcCabe complexity threshold
linters: flake8: ignore: 'W28' max-line-length: 80 max-complexity: 20
Check python code with pep8.
ignoreSet which pep8 error codes you wish to ignore.
linters: pep8: ignore: 'W28'
standardThe coding standard to use. By default the
PSR2standard is used. You can use one of the supported standards: CakePHP, PEAR, PSR1, PSR2, Squiz, WordPress, WordPress-Core or Zend.
extensionsThe extensions to check. By default only
.phpfiles will be checked.
tab_widthThe number of spaces to convert tabs into, this is useful for projects using tabs for indentation.
ignoreA comma separated list of glob patterns of that should be excluded from PHPCS analysis.
excludeA comma separated list of sniff names to ignore.
linters: phpcs: standard: 'PSR2' exclude: 'Generic.Files.LineLength,PSR2.Files.EndFileNewline' ignore: 'tests/fixtures/generated/*' extensions: '.php,.ctp' tab_width: 4
Check ruby with rubocop.
trueto pass display cop names in offense messages.
.rubocop.yml files will be respected, as described here.
linters: rubocop: display_cop_names: true
Check go-lang code with golint.
min_confidenceSet the confidence level of a problem before it is reported.
linters: golint: min_confidence: 0.85
Check bash, zsh and sh scripts with shellcheck for lint and common mistakes.
shellSelect which shell dialect to check against. Valid values are: bash, sh, ksh or zsh. Default:
excludeComma separated IDs of checks to ignore. Example:
linters: shellcheck: shell: bash exclude: 'SC2154,SC2069'
Check YAML files with yamllint. This is handy to examine confiugration files for many tools, and heira data in puppet.
configProvide a path to the yaml config file for yamlhint.
linters: yamllint: config: ./yamllint.conf
Check puppet manifests with puppet-lint,
against the puppetlabs style guide.
.puppet-lintrc files will be respected,
to allow each project to disable checks. A list of checks can be found by running
puppet-lint --help locally.
Check chef scripts with Foodcritic.
pathIf your cookbooks aren't stored in the root, use this to set the path that foodcritic runs against. Example:
path = cookbooks
Apply Ansible Lint to ansible playbooks/YAML files.
ignoreThe rule id/tags that you do not want applied.
linters: ansible: ignore: 'ANSIBLE0004,ANSIBLE0005'
Please tweet at us @sticklerci or email us at firstname.lastname@example.org and we will help you out.