From c24614d92524c5d907d03525a46ac0a31f30e2f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 6 Feb 2022 13:57:30 +0100 Subject: [PATCH] Update release notes --- docs/pages/release_notes.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index b8f8783555..b607e5fa9d 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -18,6 +18,29 @@ This is a {{ site.pmd.release_type }} release. ### API Changes +#### Deprecated API + +Some API deprecations were performed in core PMD classes, to improve compatibility with PMD 7. +- {% jdoc core::Report %}: construction methods like addViolation or createReport +- {% jdoc core::RuleContext %}: all constructors, getters and setters. A new set +of stable methods, matching those in PMD 7, was added to replace the `addViolation` +overloads of {% jdoc core::lang.rule.AbstractRule %}. In PMD 7, `RuleContext` will +be the API to report violations, and it can already be used as such in PMD 6. +- {% jdoc core::RuleSet %}: methods that serve to apply rules, including `apply`, `start`, `end`, `removeDysfunctionalRules` + +#### Changed API + +It is now forbidden to report a violation: +- With a `null` node +- With a `null` message +- With a `null` set of format arguments (prefer a zero-length array) + +{% jdoc core::RuleContext %} now requires setting the current rule before calling +{% jdoc core::lang.rule.Rule#apply(java.util.List, core::RuleContext)}. This is +done automatically by `RuleSet#apply` and such. Creating and configuring a +`RuleContext` manually is strongly advised against, as the lifecycle of `RuleContext` +will change drastically in PMD 7. + ### External Contributions {% endtocmaker %}