From 29cbb98db98dc7dd17473415c67f46b904c55e8d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 4 Dec 2025 11:18:07 +0100 Subject: [PATCH] chore: Fix manual integration tests - After pmd/pmd#6280 we don't try to analyze the SQL files under build/resources anymore for the spring framework. This results in less removed errors for test cases 1 and 2. - After pmd/pmd#6166 the patch for test case 4 didn't apply anymore. --- test/manual_integration_tests.rb | 12 ++++++------ .../patch_test_case_4_modify_docs.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/manual_integration_tests.rb b/test/manual_integration_tests.rb index b757817..781ce44 100644 --- a/test/manual_integration_tests.rb +++ b/test/manual_integration_tests.rb @@ -60,9 +60,9 @@ def test_case_1_single_java_rule_changed # project "apex-link" has 2 errors removed, since we only executed java rules # project "checkstyle" has 1 errors removed (that's an sql file...) and 1 changed # project "openjdk-11" has 0 errors removed or changed - # project "spring-framework" has 20 errors removed (these are all sql files...) and 0 changed + # project "spring-framework" has 10 errors removed (these are all sql files...) and 0 changed # project "java-regression-tests" has 0 errors removed or changed - assert_equal(2 + 2 + 1 + 20, @summary[:errors][:removed], 'found removed errors') + assert_equal(2 + 2 + 1 + 10, @summary[:errors][:removed], 'found removed errors') # The stack overflow exception might vary in the beginning/end of the stack frames shown # This stack overflow error is from checkstyle's InputIndentationLongConcatenatedString.java # instead of assert_equal(0, @summary[:errors][:changed], 'found changed errors') @@ -76,7 +76,7 @@ def test_case_1_single_java_rule_changed assert_equal("This changeset changes 0 violations,\n" \ "introduces 0 new violations, 0 new errors and 0 new configuration errors,\n" \ - 'removes 505 violations, 25 errors and 8 configuration errors.', + 'removes 505 violations, 15 errors and 8 configuration errors.', create_summary_message) assert_file_equals("#{PATCHES_PATH}/expected_patch_config_1.xml", 'target/reports/diff/patch_config.xml') @@ -105,9 +105,9 @@ def test_case_2_single_xpath_rule_changed # project "apex-link" has 2 errors removed, since we only executed java rules # project "checkstyle" has 1 error removed (that's an sql file...) and 1 error changed # project "openjdk-11" has 0 errors removed or changed - # project "spring-framework" has 20 errors removed (sql files) and 0 changed + # project "spring-framework" has 10 errors removed (sql files) and 0 changed # each project has 1 config error removed (LoosePackageCoupling dysfunctional): in total 8 config errors removed - assert_equal(2 + 2 + 1 + 20, @summary[:errors][:removed], 'found removed errors') + assert_equal(2 + 2 + 1 + 10, @summary[:errors][:removed], 'found removed errors') # The stack overflow exception might vary in the beginning/end of the stack frames shown # This stack overflow error is from checkstyle's InputIndentationLongConcatenatedString.java # instead of assert_equal(0, @summary[:errors][:changed], 'found changed errors') @@ -120,7 +120,7 @@ def test_case_2_single_xpath_rule_changed assert_equal("This changeset changes 0 violations,\n" \ "introduces 0 new violations, 0 new errors and 0 new configuration errors,\n" \ - 'removes 22 violations, 25 errors and 8 configuration errors.', + 'removes 22 violations, 15 errors and 8 configuration errors.', create_summary_message) assert_file_equals("#{PATCHES_PATH}/expected_patch_config_2.xml", 'target/reports/diff/patch_config.xml') diff --git a/test/resources/manual_integration_tests/patch_test_case_4_modify_docs.patch b/test/resources/manual_integration_tests/patch_test_case_4_modify_docs.patch index 7c98a3e..9967c40 100644 --- a/test/resources/manual_integration_tests/patch_test_case_4_modify_docs.patch +++ b/test/resources/manual_integration_tests/patch_test_case_4_modify_docs.patch @@ -14,14 +14,14 @@ diff --git a/docs/index.md b/docs/index.md index 3bafc43f4d..ac7b593dfd 100644 --- a/docs/index.md +++ b/docs/index.md -@@ -17,7 +17,7 @@ additional_js: +@@ -16,7 +16,7 @@ additional_js: - js/shuffle.js --- - + - ## 💡 Overview + ## 💡️ Overview -- 2.45.2