-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile.quality
35 lines (30 loc) · 976 Bytes
/
Rakefile.quality
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'quality/rake/task'
task :pronto do
formatter = '-f github_pr text' if ENV.key? 'PRONTO_GITHUB_ACCESS_TOKEN'
if ENV.key? 'TRAVIS_PULL_REQUEST'
ENV['PRONTO_PULL_REQUEST_ID'] = ENV['TRAVIS_PULL_REQUEST']
elsif ENV.key? 'CIRCLE_PULL_REQUEST'
ENV['PRONTO_PULL_REQUEST_ID'] = ENV['CIRCLE_PULL_REQUEST'].split('/').last
end
sh "pronto run #{formatter} -c origin/master --no-exit-code --unstaged "\
'|| true'
sh "pronto run #{formatter} -c origin/master --no-exit-code --staged || true"
sh "pronto run #{formatter} -c origin/master --no-exit-code || true"
end
task quality: %i[pronto]
Quality::Rake::Task.new do |t|
# t.verbose = true
t.exclude_files = ['.circleci/config.yml', 'LICENSE', 'CODE_OF_CONDUCT.md']
# Let's stick to the Python-relevant tools for speed
t.skip_tools = [
'rails_best_practices',
'brakeman',
'bundle_audit',
'cane',
'flay',
'flog',
'pycodestyle',
'reek',
'rubocop',
]
end