diff options
Diffstat (limited to 'tools/hooks')
-rwxr-xr-x | tools/hooks/pre-commit.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tools/hooks/pre-commit.rb b/tools/hooks/pre-commit.rb deleted file mode 100755 index 825a851..0000000 --- a/tools/hooks/pre-commit.rb +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env ruby - -result = 0 -files = Dir.glob("src/**/*.h") + Dir.glob("src/**/*.cpp") + Dir.glob("lib/**/*.h") + Dir.glob("lib/**/*.cpp") - -puts "pre-commit: #{`pwd`}" - -puts 'Checking licenses...' -files.each { |name| - File.open(name) { |file| - if file.grep(/SPDX-License-Identifier/).empty? then - puts "Missing or incorrect license header: #{name}" - result = 1 - end - } -} - -puts "pre-commit exit(#{result})" -exit result |