Merge pull request #427 from sgmap/run-rubocop

Run rubocop
This commit is contained in:
gregoirenovel 2017-06-13 15:04:24 +02:00 committed by GitHub
commit 96e9d657de
5 changed files with 10 additions and 1 deletions

View file

@ -53,6 +53,9 @@ jobs:
command: |
TESTFILES=$(circleci tests glob "spec/**/*.rb"| xargs -n 1 echo | grep -v "spec/factories/" | tr " " "\n" | circleci tests split --split-by=timings)
bundle exec rspec --color --require spec_helper -- ${TESTFILES}
- run:
name: Run rubocop
command: bundle exec rubocop
- run:
name: Run haml-lint
command: bundle exec haml-lint app/views/

View file

@ -1,3 +1,7 @@
AllCops:
Exclude:
- "db/schema.rb"
Bundler/DuplicatedGem:
Enabled: true
@ -74,7 +78,6 @@ Layout/ExtraSpacing:
Enabled: true
Exclude:
- "Guardfile"
- "db/schema.rb"
Layout/FirstArrayElementLineBreak:
Enabled: false

View file

@ -122,6 +122,7 @@ group :development do
gem 'web-console'
gem 'rack-handlers'
gem 'xray-rails'
gem 'rubocop', require: false
gem 'haml-lint'
gem 'scss_lint', require: false
end

View file

@ -714,6 +714,7 @@ DEPENDENCIES
rest-client
rgeo-geojson
rspec-rails (~> 3.0)
rubocop
sass-rails (~> 5.0)
scenic
scss_lint

View file

@ -73,6 +73,7 @@ Pour exécuter les tests de l'application, plusieurs possibilités :
## Linting
- Faire tourner RuboCop : `bundle exec rubocop`
- Linter les fichiers HAML : `bundle exec haml-lint app/views/`
- Linter les fichiers SCSS : `bundle exec scss-lint app/assets/stylesheets/`