PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
181 stars 47 forks source link

feat: exit with error status on compilation failure #1183

Closed mhasel closed 1 month ago

mhasel commented 1 month ago

When the compilation ends with a diagnostic with severity Error, we now no longer exit with 0 (Success) but rather 1 (Catchall for general errors, as defined in the Linux Documentation Project). I've also looked at the BSD standards (mirrored in the exitcode crate) and, if we want to follow these guidelines, we could opt to change it to 65 - Data Error, but I would suggest to stick with 1 for now until we decide on a more fine-grained exit approach for different error scenarios.

Refs: #817

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 95.63%. Comparing base (dafaa7e) to head (9c4eb39).

Files Patch % Lines
compiler/plc_driver/src/main.rs 0.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1183 +/- ## ========================================== - Coverage 95.64% 95.63% -0.01% ========================================== Files 148 148 Lines 43604 43607 +3 ========================================== Hits 41703 41703 - Misses 1901 1904 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.