From 8d8c7666602742028c0b2999d683d83d30bb97d9 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 7 Oct 2019 23:18:11 +0100 Subject: [PATCH] ci(travis): run `rubocop` during the `Lint` job * Automated using https://github.com/myii/ssf-formula/pull/60 --- .rubocop.yml | 10 ++++++++++ .travis.yml | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..bdae9aa9 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +# General overrides used across formulas in the org +Metrics/LineLength: + # Increase from default of `80` + # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) + Max: 88 + +# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` diff --git a/.travis.yml b/.travis.yml index 8b985f5c..78268e13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ jobs: # Run all of the linters in a single job - 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` @@ -38,6 +38,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