-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
29 lines (24 loc) · 700 Bytes
/
Rakefile
File metadata and controls
29 lines (24 loc) · 700 Bytes
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
require 'rubocop/rake_task'
require 'haml_lint/rake_task'
HamlLint::RakeTask.new
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
end
desc 'Run Brakeman and exit with non-zero exit status'
task :brakeman, :output_files do |_t, args|
require 'brakeman'
files = args[:output_files].split(' ') if args[:output_files]
tracker = Brakeman.run(
app_path: '.',
output_files: files,
print_report: true,
table_width: 2000
)
tracker.errors.any? && abort('Found errors!')
end
task :rails_best_practices do
sh 'rails_best_practices --spec .'
end
task ruby: %i(rubocop haml_lint)
task rails: %i(ruby brakeman rails_best_practices)
task default: [:ruby]