From ab35009b9e6e2e4df09bf23a3c53104b428836d6 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 22 Jun 2025 22:16:35 +0200 Subject: [PATCH] Add new rule-test schema 1.1.0 Refs pmd/pmd#5806 --- rule-tests_1_0_0.xsd | 3 +- rule-tests_1_1_0.xsd | 133 ++++++++++++++++++++++++++++++++++++ schema/index.md | 9 ++- schema/rule-tests_1_0_0.xsd | 3 +- schema/rule-tests_1_1_0.xsd | 133 ++++++++++++++++++++++++++++++++++++ 5 files changed, 276 insertions(+), 5 deletions(-) create mode 100644 rule-tests_1_1_0.xsd create mode 100644 schema/rule-tests_1_1_0.xsd diff --git a/rule-tests_1_0_0.xsd b/rule-tests_1_0_0.xsd index 6d8b1d2ac5..eb6164a591 100644 --- a/rule-tests_1_0_0.xsd +++ b/rule-tests_1_0_0.xsd @@ -1,4 +1,6 @@ + + - diff --git a/rule-tests_1_1_0.xsd b/rule-tests_1_1_0.xsd new file mode 100644 index 0000000000..18b638ad5d --- /dev/null +++ b/rule-tests_1_1_0.xsd @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + A code fragment that can be referred to by several tests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Declares the expected suppressed violations. Since PMD 7.15.0 / rule-tests 1.1.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + Language version of the source, eg 'java 8'. + + + + + + + + This attribute is deprecated, it is assumed true and ignored. + + + + + + + This attribute is deprecated. Use "disabled" instead. + If this attribute is set to "false", then the test is ignored. + + + + + + + This attribute is deprecated, it is assumed true and ignored. + + + + + + + + A reason why the test is disabled/ignored should be provided as a comment for the test. + + + + + + + If true, only this test will be executed, and all others will be disabled. + If several tests in the same file are focused, then the last one wins, in + document order. + This attribute is provided as a way for developers to temporarily focus on a single test. + Test files with a focused test should not be checked in. For this reason, + using this attribute produces a warning. + + + + + + + + + + + + + diff --git a/schema/index.md b/schema/index.md index e93ca85d51..67a9d410d0 100644 --- a/schema/index.md +++ b/schema/index.md @@ -43,10 +43,13 @@ title: PMD Schema **Namespace:** http://pmd.sourceforge.net/rule-tests -**Schema Location:** +**Schema Location:** -**Current Version:** 1.0.0 +**Current Version:** 1.1.0 -**Last Change:** 2022-07-22 +**Last Change:** 2025-06-22 **Documentation:** [Testing your rules](https://docs.pmd-code.org/latest/pmd_userdocs_extending_testing.html#test-xml-reference) + +**Old Versions:** +* [1.0.0 (2022-07-22)](https://pmd.github.io/schema/rule-tests_1_0_0.xsd) diff --git a/schema/rule-tests_1_0_0.xsd b/schema/rule-tests_1_0_0.xsd index 6d8b1d2ac5..eb6164a591 100644 --- a/schema/rule-tests_1_0_0.xsd +++ b/schema/rule-tests_1_0_0.xsd @@ -1,4 +1,6 @@ + + - diff --git a/schema/rule-tests_1_1_0.xsd b/schema/rule-tests_1_1_0.xsd new file mode 100644 index 0000000000..18b638ad5d --- /dev/null +++ b/schema/rule-tests_1_1_0.xsd @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + A code fragment that can be referred to by several tests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Declares the expected suppressed violations. Since PMD 7.15.0 / rule-tests 1.1.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + Language version of the source, eg 'java 8'. + + + + + + + + This attribute is deprecated, it is assumed true and ignored. + + + + + + + This attribute is deprecated. Use "disabled" instead. + If this attribute is set to "false", then the test is ignored. + + + + + + + This attribute is deprecated, it is assumed true and ignored. + + + + + + + + A reason why the test is disabled/ignored should be provided as a comment for the test. + + + + + + + If true, only this test will be executed, and all others will be disabled. + If several tests in the same file are focused, then the last one wins, in + document order. + This attribute is provided as a way for developers to temporarily focus on a single test. + Test files with a focused test should not be checked in. For this reason, + using this attribute produces a warning. + + + + + + + + + + + + +