forked from bluelabsio/sqlalchemy-vertica-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile.quality
33 lines (29 loc) · 899 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
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.skip_tools = [
'rails_best_practices',
'brakeman',
'bundle_audit',
'cane',
'flay',
'flog',
'pycodestyle',
'reek',
'rubocop',
]
t.source_files_exclude_glob = '{.circleci/config.yml}'
end