Add support for armclang errors

This commit is contained in:
Manuel Thalmann 2023-03-24 00:03:38 +00:00
parent e63b364a2f
commit 2f9b0d2a8b

View file

@ -212,15 +212,26 @@ then
xvfb-run bash -c "dwm & wine \"C:\Keil_v5\UV4\UV4.exe\" -j0 -b \"$projectFile\" -t \"$targetName\" -l \"$logFile\"" > /dev/null 2>&1; xvfb-run bash -c "dwm & wine \"C:\Keil_v5\UV4\UV4.exe\" -j0 -b \"$projectFile\" -t \"$targetName\" -l \"$logFile\"" > /dev/null 2>&1;
mv -f "$tempFile" "$projectFile"; mv -f "$tempFile" "$projectFile";
errorPattern="\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$"; errorPatterns=()
errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$")
errorPatterns+=("\(\"\)\(.*\)\(\", line [[:digit:]]\+\( (column [[:digit:]]\+)\)\?: \(Warning\|Error\): [A-Z0-9]\+: .*\)$");
for errorPattern in "${errorPatterns[@]}"
do
echo "$errorPattern";
sed -i \ sed -i \
-e "/$errorPattern/{" \ -e "/$errorPattern/{" \
-e "h; s/$errorPattern/realpath \"\1\"/;" \ -e "h;" \
-e "x; s/$errorPattern/\2/; x;" \ -e "s/$errorPattern/\1\n\3/" \
-e "x; s/$errorPattern/realpath \"\2\"/" \
-e "e" \ -e "e" \
-e "G; s/\n//;" \ -e "x; G; h;" \
-e "s/\([^\n]*\)\n//" \
-e "s/\([^\n]*\)\n\(.*\)/\2\1/" \
-e "x; s/\([^\n]*\)\n\(.*\)$/\1/" \
-e "G; s/\n//" \
-e "}" "$logFile"; -e "}" "$logFile";
done;
cat "$logFile"; cat "$logFile";