Skip to content

Conversation

@Mingun
Copy link
Collaborator

@Mingun Mingun commented Jan 10, 2026

For more precise error reporting.

Closes #926.

Currently error is reported at start of a tag instead of start of an attribute value.

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.55%. Comparing base (d1acdb5) to head (229d84c).
⚠️ Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
src/errors.rs 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #932      +/-   ##
==========================================
- Coverage   58.08%   54.55%   -3.53%     
==========================================
  Files          42       44       +2     
  Lines       15513    16914    +1401     
==========================================
+ Hits         9011     9228     +217     
- Misses       6502     7686    +1184     
Flag Coverage Δ
unittests 54.55% <66.66%> (-3.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

src/errors.rs Outdated
///
/// Note, that currently error location will point to a start of a tag (the `<` character)
/// instead of a start of an attribute value.
UnclosedAttributeValue(bool),
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO an enum type would be preferable to bool

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thinked about UncloseSingleQuotedAttributeValue and UncloseDoubleQuotedAttributeValue instead of one variant. It seems to me that no need to introduce UnclosedAttributeValue(enum QuoteType), because QuoteType seems will be used only here, and errors usually anyway will be just passed above.

So I can change as described, agree?

…uotedAttributeValue` and `UnclosedDoubleQuotedAttributeValue` for more precise error reporting
@Mingun Mingun force-pushed the unclosed-attr-error branch from 9125d00 to 229d84c Compare January 11, 2026 16:40
@Mingun Mingun merged commit 9f6babb into tafia:master Jan 11, 2026
7 checks passed
@Mingun Mingun deleted the unclosed-attr-error branch January 11, 2026 16:59
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.

Add SyntaxError::UnclosedAttribute

3 participants