diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-20 13:59:12 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-20 13:59:12 +0100 |
commit | f84f7bf1b35efa793cb3ff893a97e8b65982c01b (patch) | |
tree | dd7f3d665b417d57a9cc232c0b9b5083b0139c42 /tools/check-license.rb | |
parent | Added comments to PKGBUILD (diff) | |
download | smolbote-f84f7bf1b35efa793cb3ff893a97e8b65982c01b.tar.xz |
Fixed repo location in license headers
Diffstat (limited to 'tools/check-license.rb')
-rwxr-xr-x | tools/check-license.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/check-license.rb b/tools/check-license.rb new file mode 100755 index 0000000..8eeb6bb --- /dev/null +++ b/tools/check-license.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby + +result = 0 +files = Dir.glob("src/**/*.h") + Dir.glob("src/**/*.cpp") \ + + Dir.glob("lib/**/*.h") + Dir.glob("lib/**/*.cpp") \ + + Dir.glob("plugins/**/*.h") + Dir.glob("plugins/**/*.cpp") + +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 + } +} + +exit result |