You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
426 B
Ruby
21 lines
426 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
require_relative '../utils/copyrighted'
|
|
|
|
source_files_exts = ['.S', '.rs', '.rb']
|
|
|
|
staged_files = `git --no-pager diff --name-only --cached`.split(/\n/)
|
|
|
|
need_inspection = []
|
|
staged_files.each do |f|
|
|
need_inspection << f if
|
|
f == 'Makefile' || source_files_exts.include?(File.extname(f))
|
|
end
|
|
|
|
error = false
|
|
need_inspection.each do |f|
|
|
error = true unless copyrighted?(f, true)
|
|
end
|
|
|
|
exit 1 if error
|