From cec4cb5fcb4448d694eaf5f2e9cd909d907c7b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg-Michael=20Grassau?= Date: Mon, 11 Nov 2024 10:20:35 +0100 Subject: [PATCH] version 1.20.1 --- .../abapcleaner.product | 2 +- com.sap.adt.abapcleaner.app/pom.xml | 4 +- com.sap.adt.abapcleaner.feature/feature.xml | 2 +- com.sap.adt.abapcleaner.feature/pom.xml | 4 +- .../META-INF/MANIFEST.MF | 2 +- com.sap.adt.abapcleaner.gui/pom.xml | 4 +- com.sap.adt.abapcleaner.updatesite/pom.xml | 4 +- com.sap.adt.abapcleaner/META-INF/MANIFEST.MF | 2 +- com.sap.adt.abapcleaner/pom.xml | 4 +- docs/release-notes.md | 10 ++++ docs/rules.md | 2 +- docs/rules/CondenseRule.md | 50 +++++++++++++++---- pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- test/com.sap.adt.abapcleaner.test/pom.xml | 4 +- test/pom.xml | 4 +- 16 files changed, 70 insertions(+), 32 deletions(-) diff --git a/com.sap.adt.abapcleaner.app/abapcleaner.product b/com.sap.adt.abapcleaner.app/abapcleaner.product index 1b2c6cda..b39e4bfe 100644 --- a/com.sap.adt.abapcleaner.app/abapcleaner.product +++ b/com.sap.adt.abapcleaner.app/abapcleaner.product @@ -1,7 +1,7 @@ - + diff --git a/com.sap.adt.abapcleaner.app/pom.xml b/com.sap.adt.abapcleaner.app/pom.xml index 773077fc..40e99447 100644 --- a/com.sap.adt.abapcleaner.app/pom.xml +++ b/com.sap.adt.abapcleaner.app/pom.xml @@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 4.0.0 com.sap.adt.abapcleaner com.sap.adt.abapcleaner.app - 1.20.1-SNAPSHOT + 1.20.1 com.sap.adt.abapcleaner.app eclipse-repository parent com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/com.sap.adt.abapcleaner.feature/feature.xml b/com.sap.adt.abapcleaner.feature/feature.xml index d9da1244..794245f9 100644 --- a/com.sap.adt.abapcleaner.feature/feature.xml +++ b/com.sap.adt.abapcleaner.feature/feature.xml @@ -2,7 +2,7 @@ + version="1.20.1"> ABAP cleaner plug-in for ABAP Development Tools diff --git a/com.sap.adt.abapcleaner.feature/pom.xml b/com.sap.adt.abapcleaner.feature/pom.xml index 7e416fff..d122578a 100644 --- a/com.sap.adt.abapcleaner.feature/pom.xml +++ b/com.sap.adt.abapcleaner.feature/pom.xml @@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 4.0.0 com.sap.adt.abapcleaner.feature com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 com.sap.adt.abapcleaner.feature eclipse-feature parent com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/com.sap.adt.abapcleaner.gui/META-INF/MANIFEST.MF b/com.sap.adt.abapcleaner.gui/META-INF/MANIFEST.MF index a1ba8e4e..c8f5de3e 100644 --- a/com.sap.adt.abapcleaner.gui/META-INF/MANIFEST.MF +++ b/com.sap.adt.abapcleaner.gui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.sap.adt.abapcleaner.gui;singleton:=true -Bundle-Version: 1.20.1.qualifier +Bundle-Version: 1.20.1 Bundle-Vendor: %Provider-Name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/com.sap.adt.abapcleaner.gui/pom.xml b/com.sap.adt.abapcleaner.gui/pom.xml index 15e3c2aa..ff031669 100644 --- a/com.sap.adt.abapcleaner.gui/pom.xml +++ b/com.sap.adt.abapcleaner.gui/pom.xml @@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 4.0.0 com.sap.adt.abapcleaner com.sap.adt.abapcleaner.gui - 1.20.1-SNAPSHOT + 1.20.1 com.sap.adt.abapcleaner.gui eclipse-plugin parent com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/com.sap.adt.abapcleaner.updatesite/pom.xml b/com.sap.adt.abapcleaner.updatesite/pom.xml index 7eae0e32..9652b114 100644 --- a/com.sap.adt.abapcleaner.updatesite/pom.xml +++ b/com.sap.adt.abapcleaner.updatesite/pom.xml @@ -2,14 +2,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> 4.0.0 com.sap.adt.abapcleaner.updatesite - 1.20.1-SNAPSHOT + 1.20.1 ABAP Cleaner for ABAP Development Tools (ADT) eclipse-repository parent com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/com.sap.adt.abapcleaner/META-INF/MANIFEST.MF b/com.sap.adt.abapcleaner/META-INF/MANIFEST.MF index 83c7546c..e23ff783 100644 --- a/com.sap.adt.abapcleaner/META-INF/MANIFEST.MF +++ b/com.sap.adt.abapcleaner/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.sap.adt.abapcleaner;singleton:=true -Bundle-Version: 1.20.1.qualifier +Bundle-Version: 1.20.1 Bundle-Vendor: %Provider-Name Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/com.sap.adt.abapcleaner/pom.xml b/com.sap.adt.abapcleaner/pom.xml index 76cc6768..283af5ea 100644 --- a/com.sap.adt.abapcleaner/pom.xml +++ b/com.sap.adt.abapcleaner/pom.xml @@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 4.0.0 com.sap.adt.abapcleaner com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 com.sap.adt.abapcleaner eclipse-plugin parent com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/docs/release-notes.md b/docs/release-notes.md index 8dbdfa05..6db95d5e 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -6,6 +6,16 @@ as well as bugfixes of reported issues, i.e. anything that enhances or changes t For a complete list of changes (including documentation, tests, refactoring etc.), please refer to the list of [commits](../../../commits/main). +## 2024-11-11 (version 1.21.1) + +**Thank you** very much, [**openPhiL**](https://github.com/openPhiL) and + [**ConjuringCoffee**](https://github.com/ConjuringCoffee), for your bug reports! + +* Fixed rule '**Replace CONDENSE with string function**' for **structured types** ([#371](../../../issues/371)) +* Fixed rule '**Simplify a chain with one element**' for **first command in code** document ([#372](../../../issues/372)) +* Fixed rule '**Align METHODS declarations**' for FINAL with **FOR EVENT** ([#373](../../../issues/373)) +* Updated known CamelCase names + ## 2024-10-19 (version 1.20.0) **Great thanks** to [**ConjuringCoffee**](https://github.com/ConjuringCoffee) for the issue behind the custom view and field names! diff --git a/docs/rules.md b/docs/rules.md index f5ae91d4..f33f5874 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -1,6 +1,6 @@ # Available Cleanup Rules -ABAP cleaner offers 98 cleanup rules with a total of 461 configuration options: +ABAP cleaner offers 98 cleanup rules with a total of 462 configuration options: ## Empty Lines diff --git a/docs/rules/CondenseRule.md b/docs/rules/CondenseRule.md index c95fe125..77fecbda 100644 --- a/docs/rules/CondenseRule.md +++ b/docs/rules/CondenseRule.md @@ -18,6 +18,8 @@ This rule is part of the **essential** profile, as it is explicitly demanded by * \[ \] Explicitly specify parameter del = \` \`, except for NO-GAPS * \[X\] Explicitly specify parameter from = \` \` for NO-GAPS * \[ \] Keep parameters on one line \(see rule 'Align parameters and components', option 'Keep other one-liners'\) +* \[X\] Only replace CONDENSE for known unstructured types \(STRING, C, N, CHAR10 etc.\) +* Warning: deactivating this option might lead to syntax errors if your code contains CONDENSE with structured types \(but at least the syntax check will immediately show this\) ## Examples @@ -25,13 +27,19 @@ This rule is part of the **essential** profile, as it is explicitly demanded by ```ABAP METHOD replace_condense. + TYPES: BEGIN OF ty_s_any_struc, + field TYPE c LENGTH 10, + END OF ty_s_any_struc. + CONSTANTS lc_abc_with_gaps TYPE string VALUE ` a b c `. - DATA lv_text_a TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_text_b TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_text_c TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_string_a TYPE string VALUE lc_abc_with_gaps. - DATA lv_string_b TYPE string VALUE lc_abc_with_gaps. + DATA lv_text_a TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_text_b TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_text_c TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_string_a TYPE string VALUE lc_abc_with_gaps. + DATA lv_string_b TYPE string VALUE lc_abc_with_gaps. + DATA ls_structure TYPE ty_s_any_struc. + DATA l_unknown_type TYPE if_any_interface=>ty_unknown_type. " condense first text field to 'a b c', second one to 'abc' CONDENSE lv_text_a. @@ -44,6 +52,13 @@ This rule is part of the **essential** profile, as it is explicitly demanded by " condense text field with offset 5 and length 7 to ` a b c` " (specifying offset and length in write positions is possible for text fields, but not for strings) CONDENSE lv_text_c+5(7). + + " unlike CONDENSE, the string function condense( ) does not work on structured data; therefore, + " changing the next statements might cause syntax errors. You can activate the option + " 'Only replace CONDENSE for known unstructured types' to restrict this cleanup rule + " to cases in which ABAP cleaner can clearly determine the type (as above) + CONDENSE ls_structure. + CONDENSE l_unknown_type. ENDMETHOD. ``` @@ -52,13 +67,19 @@ Resulting code: ```ABAP METHOD replace_condense. + TYPES: BEGIN OF ty_s_any_struc, + field TYPE c LENGTH 10, + END OF ty_s_any_struc. + CONSTANTS lc_abc_with_gaps TYPE string VALUE ` a b c `. - DATA lv_text_a TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_text_b TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_text_c TYPE char30 VALUE lc_abc_with_gaps. - DATA lv_string_a TYPE string VALUE lc_abc_with_gaps. - DATA lv_string_b TYPE string VALUE lc_abc_with_gaps. + DATA lv_text_a TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_text_b TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_text_c TYPE char30 VALUE lc_abc_with_gaps. + DATA lv_string_a TYPE string VALUE lc_abc_with_gaps. + DATA lv_string_b TYPE string VALUE lc_abc_with_gaps. + DATA ls_structure TYPE ty_s_any_struc. + DATA l_unknown_type TYPE if_any_interface=>ty_unknown_type. " condense first text field to 'a b c', second one to 'abc' lv_text_a = condense( lv_text_a ). @@ -74,7 +95,14 @@ Resulting code: " condense text field with offset 5 and length 7 to ` a b c` " (specifying offset and length in write positions is possible for text fields, but not for strings) - lv_text_c+5(7) = condense( lv_text_c+5(7) ). + CONDENSE lv_text_c+5(7). + + " unlike CONDENSE, the string function condense( ) does not work on structured data; therefore, + " changing the next statements might cause syntax errors. You can activate the option + " 'Only replace CONDENSE for known unstructured types' to restrict this cleanup rule + " to cases in which ABAP cleaner can clearly determine the type (as above) + CONDENSE ls_structure. + CONDENSE l_unknown_type. ENDMETHOD. ``` diff --git a/pom.xml b/pom.xml index 32f5aa91..6134f9d1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.sap.adt.abapcleaner parent - 1.20.1-SNAPSHOT + 1.20.1 ABAP cleaner pom diff --git a/test/com.sap.adt.abapcleaner.test/META-INF/MANIFEST.MF b/test/com.sap.adt.abapcleaner.test/META-INF/MANIFEST.MF index afcdd2bf..03e5e53a 100644 --- a/test/com.sap.adt.abapcleaner.test/META-INF/MANIFEST.MF +++ b/test/com.sap.adt.abapcleaner.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Unit Tests for com.sap.adt.abapcleaner Bundle-SymbolicName: com.sap.adt.abapcleaner.test;singleton:=true -Bundle-Version: 1.20.1.qualifier +Bundle-Version: 1.20.1 Bundle-Vendor: abap-dev Fragment-Host: com.sap.adt.abapcleaner Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/test/com.sap.adt.abapcleaner.test/pom.xml b/test/com.sap.adt.abapcleaner.test/pom.xml index d155ec7f..0d4a0ba8 100644 --- a/test/com.sap.adt.abapcleaner.test/pom.xml +++ b/test/com.sap.adt.abapcleaner.test/pom.xml @@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs 4.0.0 com.sap.adt.abapcleaner com.sap.adt.abapcleaner.test - 1.20.1-SNAPSHOT + 1.20.1 com.sap.adt.abapcleaner.test eclipse-test-plugin tests com.sap.adt.abapcleaner - 1.20.1-SNAPSHOT + 1.20.1 ../ diff --git a/test/pom.xml b/test/pom.xml index c47c539b..8a316288 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -4,14 +4,14 @@ 4.0.0 com.sap.adt.abapcleaner tests - 1.20.1-SNAPSHOT + 1.20.1 Test Fragments pom com.sap.adt.abapcleaner parent - 1.20.1-SNAPSHOT + 1.20.1 ../