Skip to content

Prepend indent for user-provided multi-line compilation messages#353

Merged
yevhenii-nadtochii merged 9 commits intomasterfrom
compilation-message-indents
May 16, 2025
Merged

Prepend indent for user-provided multi-line compilation messages#353
yevhenii-nadtochii merged 9 commits intomasterfrom
compilation-message-indents

Conversation

@yevhenii-nadtochii
Copy link
Contributor

@yevhenii-nadtochii yevhenii-nadtochii commented May 16, 2025

This PR updates Compilation object, so that it prints multi-line error and warning messages, indenting each following line (after the first) with the length of the leading prefix.

An example of a real compilation error from validation using this version of ProtoData:

> Task :java-tests:validating:launchTestFixturesProtoData FAILED
e: file:///Users/yevhenii/Projects/Spine/validation-master/java-tests/validating/src/testFixtures/proto/spine/test/tools/validate/numbers.proto:39:5: The `(range)` option could not parse the passed range value.
   Value: `[5.0 .. +1.0]`.
   Target field: `spine.test.tools.validate.Probability.value`.
   Reason: the lower bound `5.0` must be less than the upper bound `1.0`.
   Examples of the correct ranges: `(-5..5]`, `[0 .. 10)`.

Concatenation for String expressions

Additionally, this PR moves operators for String expression concatenation introduced in validation.

@yevhenii-nadtochii yevhenii-nadtochii self-assigned this May 16, 2025
@yevhenii-nadtochii yevhenii-nadtochii changed the title Prepend indent for user-provided multiline compilation messages Prepend indent for user-provided multi-line compilation messages May 16, 2025
@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.95%. Comparing base (f6be09a) to head (07d99eb).
Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #353      +/-   ##
============================================
+ Coverage     73.85%   73.95%   +0.09%     
- Complexity      613      618       +5     
============================================
  Files           197      198       +1     
  Lines          4296     4311      +15     
  Branches        397      398       +1     
============================================
+ Hits           3173     3188      +15     
  Misses          996      996              
  Partials        127      127              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as ready for review May 16, 2025 16:39
@yevhenii-nadtochii
Copy link
Contributor Author

@armiol @alexander-yevsyukov PTAL

Copy link
Collaborator

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yevhenii-nadtochii yevhenii-nadtochii merged commit 7aad9f9 into master May 16, 2025
8 checks passed
@yevhenii-nadtochii yevhenii-nadtochii deleted the compilation-message-indents branch May 16, 2025 16:53
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