mirror of https://github.com/tailix/libkernaux.git
30 lines
504 B
Ruby
30 lines
504 B
Ruby
# frozen_string_literal: true
|
|
|
|
desc 'Run default checks'
|
|
task default: :lint
|
|
|
|
desc 'Run code analysis tools'
|
|
task lint: %i[rubocop cppcheck]
|
|
|
|
desc 'Fix code style (rubocop --auto-correct)'
|
|
task fix: 'rubocop:auto_correct'
|
|
|
|
begin
|
|
require 'rubocop/rake_task'
|
|
RuboCop::RakeTask.new
|
|
rescue LoadError
|
|
nil
|
|
end
|
|
|
|
desc 'Run cppcheck'
|
|
task :cppcheck do
|
|
sh(
|
|
'cppcheck',
|
|
'--quiet',
|
|
'--error-exitcode=1',
|
|
'--std=c99',
|
|
'--enable=warning,style,performance,portability',
|
|
__dir__,
|
|
)
|
|
end
|