Skip to content

[BUGFIX] Ensure column number set after RuleSet::addRule() #1263

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 27, 2025

Conversation

JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented May 23, 2025

Note that this bug (or inconsistency) only occurs following the addtion of getColumnNumber() returning a nullable int (#1221 and #1225). These changes are not yet included in any release.

Part of #974.

Note that this bug (or inconsistency) only occurs following the addtion of
`getColumnNumber()` returning a nullable `int` (#1221 and #1225).
These changes are not yet included in any release.

Part of #974.
@coveralls
Copy link

Coverage Status

coverage: 57.087% (+0.05%) from 57.038%
when pulling 6524b63 on bugfix/addrule/ensure-column-number
into 9bc6622 on main.

@oliverklee oliverklee merged commit 6c565cf into main May 27, 2025
21 checks passed
@oliverklee oliverklee deleted the bugfix/addrule/ensure-column-number branch May 27, 2025 08:28
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