diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-04-02 15:47:17 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-04-02 15:47:17 +0200 |
commit | de247a9ccff6903c7c7b956dd4d85e4f0c3b9445 (patch) | |
tree | 1199f2a5b8493507a8ab26fe39a6e96ff5de4266 /tools/hooks | |
parent | Moved CookiesForm into the ProfileDialog (diff) | |
download | smolbote-de247a9ccff6903c7c7b956dd4d85e4f0c3b9445.tar.xz |
Some code cleanup
Diffstat (limited to 'tools/hooks')
-rwxr-xr-x | tools/hooks/pre-commit.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/hooks/pre-commit.rb b/tools/hooks/pre-commit.rb index 83b4978..6e52147 100755 --- a/tools/hooks/pre-commit.rb +++ b/tools/hooks/pre-commit.rb @@ -3,6 +3,8 @@ result = 0 files = Dir['src/**/*.h'] + Dir['src/**/*.cpp'] - Dir['src/3rd-party/**/*'] +puts "Running in #{`pwd`}" + puts 'Checking licenses...' files.each { |name| File.open(name) { |f| @@ -15,9 +17,12 @@ files.each { |name| puts 'Checking style...' if not `astyle --dry-run --formatted --options=astyle.rc #{files.join(' ')}`.empty? then - system "astyle --verbose --formatted --options=astyle.rc #{files.join(' ')}" + system "astyle --verbose --suffix=none --formatted --options=astyle.rc #{files.join(' ')}" result = 1 end +puts 'Running cppcheck...' +`cppcheck --quiet --enable=all --inconclusive --std=posix -I src/ .` + puts "pre-commit exit(#{result})" exit result |