Move linters to a Rake task
This allow running all linters in a single pass.
This commit is contained in:
parent
39a06bec16
commit
d6fd150929
3 changed files with 13 additions and 19 deletions
|
@ -90,20 +90,8 @@ jobs:
|
||||||
- *yarn_restore_cache
|
- *yarn_restore_cache
|
||||||
- *yarn_install
|
- *yarn_install
|
||||||
- run:
|
- run:
|
||||||
name: Run eslint
|
name: Run linters
|
||||||
command: yarn lint:js
|
command: bundle exec rake lint
|
||||||
- run:
|
|
||||||
name: Run rubocop
|
|
||||||
command: bundle exec rubocop
|
|
||||||
- run:
|
|
||||||
name: Run brakeman
|
|
||||||
command: bundle exec brakeman
|
|
||||||
- run:
|
|
||||||
name: Run haml-lint
|
|
||||||
command: bundle exec haml-lint app/views/
|
|
||||||
- run:
|
|
||||||
name: Run scss-lint
|
|
||||||
command: bundle exec scss-lint app/assets/stylesheets/
|
|
||||||
deploy:
|
deploy:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -108,11 +108,9 @@ Une fois `overmind` lancé, et un breakpoint `byebug` inséré dans le code, il
|
||||||
|
|
||||||
## Linting
|
## Linting
|
||||||
|
|
||||||
- Faire tourner RuboCop : `bundle exec rubocop`
|
Le projet utilise plusieurs linters pour vérifier la lisibilité et la qualité code.
|
||||||
- Faire tourner Brakeman : `bundle exec brakeman`
|
|
||||||
- Linter les fichiers HAML : `bundle exec haml-lint app/views/`
|
- Faire tourner tous les linters : `bin/rake lint`
|
||||||
- Linter les fichiers SCSS : `bundle exec scss-lint app/assets/stylesheets/`
|
|
||||||
- Linter les fichiers JavaScript : `yarn lint:js` (`yarn lint:js --fix`)
|
|
||||||
- [AccessLint](http://accesslint.com/) tourne automatiquement sur les PRs
|
- [AccessLint](http://accesslint.com/) tourne automatiquement sur les PRs
|
||||||
|
|
||||||
## Déploiement
|
## Déploiement
|
||||||
|
|
8
Rakefile
8
Rakefile
|
@ -5,6 +5,14 @@ require File.expand_path('config/application', __dir__)
|
||||||
|
|
||||||
Rails.application.load_tasks
|
Rails.application.load_tasks
|
||||||
|
|
||||||
|
task :lint do
|
||||||
|
sh "bundle exec rubocop"
|
||||||
|
sh "bundle exec haml-lint app/views/"
|
||||||
|
sh "bundle exec scss-lint app/assets/stylesheets/"
|
||||||
|
sh "bundle exec brakeman --no-pager"
|
||||||
|
sh "yarn lint:js"
|
||||||
|
end
|
||||||
|
|
||||||
task :deploy do
|
task :deploy do
|
||||||
domains = %w(37.187.249.111 149.202.72.152 149.202.198.6)
|
domains = %w(37.187.249.111 149.202.72.152 149.202.198.6)
|
||||||
domains.each do |domain|
|
domains.each do |domain|
|
||||||
|
|
Loading…
Reference in a new issue