From c23c7e3bbaf8fa883ce1dfa42e63ce22b8af41da Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 11 Oct 2020 19:26:11 +0300 Subject: [PATCH] Check for executable bit on non-executable files --- utils/check-style/check-style | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/check-style/check-style b/utils/check-style/check-style index 8864b8e161f..a65ffeb8c67 100755 --- a/utils/check-style/check-style +++ b/utils/check-style/check-style @@ -91,3 +91,6 @@ git status -uno | grep ya.make && echo "ya.make files should be generated with u # Check that every header file has #pragma once in first line find $ROOT_PATH/{src,programs,utils} -name '*.h' | while read file; do [[ $(head -n1 $file) != '#pragma once' ]] && echo "File $file must have '#pragma once' in first line"; done + +# Check for executable bit on non-executable files +find $ROOT_PATH/{src,base,programs,utils,tests,docs,website,cmake} '(' -name '*.cpp' -or -name '*.h' -or -name '*.sql' -or -name '*.xml' -or -name '*.reference' -or -name '*.txt' -or -name '*.md' ')' -and -executable | grep -q '.' && echo "These files should not be executable."