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

Fix line number reporting #33

Merged
merged 5 commits into from
Feb 18, 2022
Merged

Fix line number reporting #33

merged 5 commits into from
Feb 18, 2022

Conversation

ilslv
Copy link
Member

@ilslv ilslv commented Feb 16, 2022

Synopsis

Currently reported line number may be greater that the actual one. This happens, because GherkinEnv::line_offsets may contain duplicates.

Solution

Check whether value already exists before pushing into GherkinEnv::line_offsets.

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

@ilslv ilslv added bug Something isn't working enhancement Improvement of existing features or bugfix labels Feb 16, 2022
@ilslv ilslv added this to the 0.12.0 milestone Feb 16, 2022
@ilslv ilslv self-assigned this Feb 16, 2022
@ilslv
Copy link
Member Author

ilslv commented Feb 16, 2022

Fix `LineCol::line` reported by parser (#33)

Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

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

@ilslv could you also add similar tests for comments? Thanks.

CHANGELOG.md Outdated Show resolved Hide resolved
@ilslv ilslv requested a review from tyranron February 17, 2022 06:05
@tyranron tyranron modified the milestones: 0.12.0, 0.11.2 Feb 18, 2022
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

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

@ilslv thanks!

@tyranron tyranron merged commit b047b39 into main Feb 18, 2022
@tyranron tyranron deleted the fix-line-number branch February 18, 2022 09:46
tyranron added a commit that referenced this pull request Feb 18, 2022
tyranron pushed a commit to cucumber-rs/cucumber that referenced this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Improvement of existing features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants