File tree Expand file tree Collapse file tree 1 file changed +1
-35
lines changed
llvm-spirv/.github/workflows Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Original file line number Diff line number Diff line change 9696 run : |
9797 cat diff-to-inspect.txt | /usr/lib/llvm-${{ env.LLVM_VERSION }}/share/clang/clang-tidy-diff.py \
9898 -p1 -clang-tidy-binary clang-tidy-${{ env.LLVM_VERSION }} -quiet \
99- -path ${{ github.workspace}}/build > clang-tidy.log 2>/dev/null
100- # By some reason, clang-tidy log contains tons of extra empty lines,
101- # that confuse the check below
102- sed -i '/^$/d' clang-tidy.log
103- if [ -s clang-tidy.log ]; then
104- if ! grep -q "No relevant changes found." clang-tidy.log; then
105- # Emit annotations
106- while read -r line; do
107- type="error"
108- if [[ $line == *"warning:"* ]]; then
109- type="warning"
110- elif [[ $line == *"error:"* ]]; then
111- type="error"
112- else
113- continue
114- fi
115-
116- absolute_path=$(echo $line | grep -Po "^[\w\d-./]+(?=:)")
117- relative_path=${absolute_path##"${{ github.workspace }}"}
118-
119- line_number=$(echo $line | grep -Po "(?<=:)\d+(?=:\d)")
120-
121- message=$(echo $line | grep -Po "(?<=${type}: ).*$")
122-
123- # see [workflow-commands] for documentation
124- echo "::${type} file=${relative_path},line=${line_number}::${message}"
125- done < clang-tidy.log
126-
127- echo "clang-tidy found incorrectly written code:"
128- cat clang-tidy.log
129- exit 1
130- else
131- rm clang-tidy.log # to avoid uploading empty file
132- fi
133- fi
99+ -path ${{ github.workspace}}/build
134100
135101 - name : Upload patch with clang-format fixes
136102 uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments