Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java compiler error matching #432

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

SebastianSchlecht
Copy link

When compiling a template containing a mix of warnings and errors the first warning/error will be matched by getErrorMessage which might not be the desired error message.
This leads to a misleading TemplateException like

10:32:17,860 ERROR Failed to execute goal gg.jte:jte-maven-plugin:3.1.13:precompile (web-templates) on project example: Execution web-templates of goal gg.jte:jte-maven-plugin:3.1.13:precompile failed: Failed to compile template, error at some/file/with/warning.jte:35

with the culprit buried deeper inside the log.

This proposed change will only match messages of the type 'error' and therefore shows the message responsible for the failed compilation on top.

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.16%. Comparing base (dbecede) to head (7cd0a95).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #432      +/-   ##
============================================
- Coverage     91.23%   91.16%   -0.07%     
- Complexity     1219     1220       +1     
============================================
  Files            76       76              
  Lines          3170     3170              
  Branches        491      492       +1     
============================================
- Hits           2892     2890       -2     
- Misses          167      169       +2     
  Partials        111      111              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@casid
Copy link
Owner

casid commented Mar 3, 2025

Awesome, thanks @SebastianSchlecht!

@casid casid merged commit f0b6fa2 into casid:main Mar 3, 2025
15 checks passed
@SebastianSchlecht SebastianSchlecht deleted the java-compiler-error-matching branch March 4, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants