-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile.quality
36 lines (31 loc) · 1.49 KB
/
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
36
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',
'bigfiles',
'brakeman',
'bundle_audit',
'cane',
'flay',
'flog',
'pycodestyle',
'reek',
'rubocop',
]
t.source_files_exclude_glob =
'{cover/**/*,tests/integration/records/records_schema_v1_schema.json,tests/component/records/schema/future_incompatible_redshift_example_1.json,tests/component/records/schema/pandas_example_1.json,tests/component/records/schema/redshift_example_1.json,records_mover/db/bigquery/load_job_config_options.py,records_mover/records/pandas/read_csv_options.py,.circleci/config.yml,CODE_OF_CONDUCT.md,LICENSE,types/stubs/inspect.pyi,records_mover/db/postgres/sqlalchemy_postgres_copy.py,docs/schema/redshift_example_1.json,docs/schema/pandas_example_1.json,docs/RECORDS_SPEC.md,docs/schema/SCHEMAv1.md,docs/records-mover-horizontal.png}'
end