mirror of
https://github.com/dev-sec/linux-baseline
synced 2024-11-26 13:00:21 +00:00
25 lines
481 B
Ruby
25 lines
481 B
Ruby
#!/usr/bin/env rake
|
|
|
|
require 'rake/testtask'
|
|
require 'rubocop/rake_task'
|
|
|
|
# Rubocop
|
|
desc 'Run Rubocop lint checks'
|
|
task :rubocop do
|
|
RuboCop::RakeTask.new
|
|
end
|
|
|
|
# lint the project
|
|
desc 'Run robocop linter'
|
|
task lint: [:rubocop]
|
|
|
|
# run tests
|
|
task default: [:lint, 'test:check']
|
|
|
|
namespace :test do
|
|
# run inspec check to verify that the profile is properly configured
|
|
task :check do
|
|
dir = File.join(File.dirname(__FILE__))
|
|
sh("bundle exec inspec check #{dir}")
|
|
end
|
|
end
|