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]\+: .*\)$");
sed -i \ for errorPattern in "${errorPatterns[@]}"
-e "/$errorPattern/{" \ do
-e "h; s/$errorPattern/realpath \"\1\"/;" \ echo "$errorPattern";
-e "x; s/$errorPattern/\2/; x;" \ sed -i \
-e "e" \ -e "/$errorPattern/{" \
-e "G; s/\n//;" \ -e "h;" \
-e "}" "$logFile"; -e "s/$errorPattern/\1\n\3/" \
-e "x; s/$errorPattern/realpath \"\2\"/" \
-e "e" \
-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";
done;
cat "$logFile"; cat "$logFile";