Skip to content

[BUGFIX] Ensure valid position for first Rule added to RuleSet #1262

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented May 23, 2025

Part of #974.

@coveralls
Copy link

coveralls commented May 23, 2025

Coverage Status

coverage: 57.062% (+0.02%) from 57.038%
when pulling 3b19c9e on bugfix/addrule/first-rule-position
into 9bc6622 on main.

@JakeQZ JakeQZ force-pushed the bugfix/addrule/first-rule-position branch from 4c27f71 to 3b19c9e Compare May 23, 2025 22:38
@oliverklee oliverklee merged commit be60456 into main May 28, 2025
21 checks passed
@oliverklee oliverklee deleted the bugfix/addrule/first-rule-position branch May 28, 2025 08:12
JakeQZ added a commit that referenced this pull request Jun 4, 2025
This is the backport of #1263, #1262 and #1265.

Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.

Part of #974.
JakeQZ added a commit that referenced this pull request Jun 4, 2025
This is the backport of #1263, #1262 and #1265.

Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.

Part of #974.
JakeQZ added a commit that referenced this pull request Jun 4, 2025
This is the backport of #1263, #1262 and #1265.

Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.

Part of #974.
oliverklee pushed a commit that referenced this pull request Jun 4, 2025
This is the backport of #1263, #1262 and #1265.

Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.

Part of #974.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants