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

feat(#322): unlint-non-existing-defect lint #339

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

h1alexbel
Copy link
Contributor

In this PR I've added new lint: unlint-non-existing-defect, that issues defects with warning severity, in case of usage of +unlint meta to suppress non-existing defects.

closes #322
History:

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon please check

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon would like to hear your feedback on this

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon reminder


/**
* Lints.
* @since 0.0.0
Copy link
Member

Choose a reason for hiding this comment

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

@h1alexbel let's put a valid minor version here

String.format(
"program/metas/meta[head='unlint' and tail='%s']/@line", unlint
)
).map(xnav -> xnav.text().get())
Copy link
Member

Choose a reason for hiding this comment

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

@h1alexbel I think something's wrong with indentation here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maxonfjvipon qulice complains otherwise about cascade indentation

unlint ->
xml.path(
String.format(
"program/metas/meta[head='unlint' and tail='%s']/@line", unlint
Copy link
Member

Choose a reason for hiding this comment

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

@h1alexbel let's try to use Xnav here instead of XPath

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maxonfjvipon actually we are using Xnav here:

final Xnav xml = new Xnav(xmir.inner());
xml.path(..);

Or you meant we should use xml.element() instead?

Copy link
Member

Choose a reason for hiding this comment

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

@h1alexbel sorry, didn't notice it. Then it's okay

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon updated. Take a look, please

@h1alexbel
Copy link
Contributor Author

@maxonfjvipon reminder

@h1alexbel
Copy link
Contributor Author

@yegor256 take a look, please

@yegor256 yegor256 merged commit 8d09f40 into objectionary:master Feb 20, 2025
16 checks passed
@yegor256
Copy link
Member

@h1alexbel thanks!

@h1alexbel h1alexbel deleted the 322 branch February 20, 2025 19:30
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.

+unlint may only suppress an existing warning
3 participants