Skip to content

Warn only once about deprecated rules.#703

Merged
slawekjaranowski merged 3 commits intoapache:masterfrom
UncleOwen:warn-only-once-on-deprecated-rules
Apr 21, 2026
Merged

Warn only once about deprecated rules.#703
slawekjaranowski merged 3 commits intoapache:masterfrom
UncleOwen:warn-only-once-on-deprecated-rules

Conversation

@UncleOwen
Copy link
Copy Markdown
Contributor

See pmd/pmd#6610

PmdAnalysis.create() already warns about deprecated rules. No need to load them twice, just to trigger the warning.

Added an integration test that is basically a copy of MPMD-268-deprecated-rules - just checks for exactly one log message instead of at least one.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

PmdAnalysis.create() already warns about deprecated rules. No need to load them twice, just to trigger the warning.
Comment thread src/it/PMD-6610-warn-only-once-about-deprecated-rules/verify.groovy Outdated
@UncleOwen UncleOwen force-pushed the warn-only-once-on-deprecated-rules branch from 69750bd to 1e9227c Compare April 21, 2026 17:12
@slawekjaranowski
Copy link
Copy Markdown
Member

Added an integration test that is basically a copy of MPMD-268-deprecated-rules - just checks for exactly one log message instead of at least one.

now I see we have the seme test.
I would like to change asertion in existing instead of adding a copy

@UncleOwen
Copy link
Copy Markdown
Contributor Author

Fine with me :)

@slawekjaranowski slawekjaranowski merged commit 2f90c8d into apache:master Apr 21, 2026
17 checks passed
@github-actions github-actions Bot added this to the 3.28.1 milestone Apr 21, 2026
@github-actions
Copy link
Copy Markdown

@slawekjaranowski Please assign appropriate label to PR according to the type of change.

@slawekjaranowski slawekjaranowski added the bug Something isn't working label Apr 21, 2026
@UncleOwen UncleOwen deleted the warn-only-once-on-deprecated-rules branch April 21, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants