aboutsummaryrefslogtreecommitdiff
path: root/tools/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hooks')
-rwxr-xr-xtools/hooks/pre-commit.rb19
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