diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..139af277 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# Increase from default of `80` +# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) +Metrics/LineLength: + Max: 88 + +# Remaining offenses to be fixed, e.g. via. `rubocop --auto-gen-config` diff --git a/.travis.yml b/.travis.yml index 2017b95d..3a470617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ jobs: - language: node_js node_js: lts/* - env: 'Lint: salt-lint, yamllint & commitlint' + env: 'Lint: salt-lint, yamllint, rubocop & commitlint' before_install: skip script: # Install and run `salt-lint` @@ -39,6 +39,9 @@ jobs: # Need at least `v1.17.0` for the `yaml-files` setting - pip install --user yamllint>=1.17.0 - yamllint -s . + # Install and run `rubocop` + - gem install rubocop + - rubocop -d # Install and run `commitlint` - npm install @commitlint/config-conventional -D - npm install @commitlint/travis-cli -D