File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454
5555fi
5656
57- output=$( clazy-standalone --checks=" $CHECKS " -p=" $DATABASE " \
57+ export CLAZY_CHECKS=" $CHECKS "
58+ output=$( set -e; clazy-standalone -p=" $DATABASE " \
5859 --header-filter=" $HEADER_FILTER " --ignore-dirs=" $IGNORE_DIRS " \
5960 " ${options[@]} " " ${extra_args[@]} " " ${extra_args_before[@]} " " ${files[@]} " 2>&1 )
6061
@@ -77,10 +78,21 @@ echo "$output" | grep -E "$pattern" | while IFS= read -r line; do
7778 warning_message=" ${BASH_REMATCH[5]} "
7879 warning_code=" ${BASH_REMATCH[6]} "
7980
81+ counter=0
8082 if [[ " $relative_path " == /* ]]; then
8183 absolute_path=$relative_path
8284 else
83- absolute_path=$( realpath " $DATABASE /$relative_path " )
85+ for full_path in " ${files[@]} " ; do
86+ if [[ " $( basename " $full_path " ) " == " $relative_path " ]]; then
87+ absolute_path=" $full_path "
88+ (( counter++ ))
89+ fi
90+ done
91+ fi
92+
93+ # This is incredibly bad, but I don't know how to properly handle the clazy output yet
94+ if [ " $counter " -ne 1 ]; then
95+ continue
8496 fi
8597
8698 warning_key=" ${absolute_path} :${line_number} :${column_number} :${warning_code} "
You can’t perform that action at this time.
0 commit comments