Skip to content

Commit 85d89c6

Browse files
committed
version 1.19.0
1 parent a2d67d8 commit 85d89c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2440
-26
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ while giving you full control over which rules are used and how.
2323
![ABAP cleaner - code cleanup at a keystroke](docs/images/cleanup-example.png "ABAP cleaner - code cleanup at a keystroke")
2424

2525
With ABAP cleaner, you can clean any amount of code from a single statement to an entire code document
26-
with **one keystroke**. ABAP cleaner then applies **75+ different [cleanup rules](docs/rules.md)** to your code section,
26+
with **one keystroke**. ABAP cleaner then applies **95+ different [cleanup rules](docs/rules.md)** to your code section,
2727
cleaning approx. 1 MB of code per second.
2828

2929
> Please don't get us wrong: Of course, an automated tool can NOT replace all other clean code efforts.
@@ -98,7 +98,7 @@ allowing you to stay in SAP GUI and do the cleanup with *Ctrl + C*, *Ctrl + V*.
9898
### Scope of the Tool
9999

100100
ABAP cleaner can be used to clean up both existing and new code, both product code and test code,
101-
both with a "broadband" approach (simultaneously applying 75+ different rules)
101+
both with a "broadband" approach (simultaneously applying 95+ different rules)
102102
and a focused approach (cleaning with a limited selection of rules).
103103

104104
ABAP cleaner was implemented with object-oriented ABAP in mind, but it may also be used for code in reports and functions.

com.sap.adt.abapcleaner.app/abapcleaner.product

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?pde version="3.5"?>
33

4-
<product name="ABAP cleaner" uid="com.sap.adt.abapcleaner.app" application="com.sap.adt.abapcleaner.standalone.app" version="1.18.2.qualifier" type="features" includeLaunchers="true" autoIncludeRequirements="true">
4+
<product name="ABAP cleaner" uid="com.sap.adt.abapcleaner.app" application="com.sap.adt.abapcleaner.standalone.app" version="1.19.0" type="features" includeLaunchers="true" autoIncludeRequirements="true">
55

66
<configIni use="default">
77
</configIni>

com.sap.adt.abapcleaner.app/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.sap.adt.abapcleaner</groupId>
55
<artifactId>com.sap.adt.abapcleaner.app</artifactId>
6-
<version>1.18.2-SNAPSHOT</version>
6+
<version>1.19.0</version>
77
<name>com.sap.adt.abapcleaner.app</name>
88
<packaging>eclipse-repository</packaging>
99

1010
<parent>
1111
<artifactId>parent</artifactId>
1212
<groupId>com.sap.adt.abapcleaner</groupId>
13-
<version>1.18.2-SNAPSHOT</version>
13+
<version>1.19.0</version>
1414
<relativePath>../</relativePath>
1515
</parent>
1616

com.sap.adt.abapcleaner.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="com.sap.adt.abapcleaner.feature"
44
label="ABAP cleaner"
5-
version="1.18.2.qualifier">
5+
version="1.19.0">
66

77
<description>
88
ABAP cleaner plug-in for ABAP Development Tools

com.sap.adt.abapcleaner.feature/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>com.sap.adt.abapcleaner.feature</artifactId>
55
<groupId>com.sap.adt.abapcleaner</groupId>
6-
<version>1.18.2-SNAPSHOT</version>
6+
<version>1.19.0</version>
77
<name>com.sap.adt.abapcleaner.feature</name>
88
<packaging>eclipse-feature</packaging>
99

1010
<parent>
1111
<artifactId>parent</artifactId>
1212
<groupId>com.sap.adt.abapcleaner</groupId>
13-
<version>1.18.2-SNAPSHOT</version>
13+
<version>1.19.0</version>
1414
<relativePath>../</relativePath>
1515
</parent>
1616

com.sap.adt.abapcleaner.gui/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: com.sap.adt.abapcleaner.gui;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.19.0
66
Bundle-Vendor: %Provider-Name
77
Bundle-Localization: plugin
88
Bundle-RequiredExecutionEnvironment: JavaSE-17

com.sap.adt.abapcleaner.gui/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.sap.adt.abapcleaner</groupId>
55
<artifactId>com.sap.adt.abapcleaner.gui</artifactId>
6-
<version>1.18.2-SNAPSHOT</version>
6+
<version>1.19.0</version>
77
<name>com.sap.adt.abapcleaner.gui</name>
88
<packaging>eclipse-plugin</packaging>
99

1010
<parent>
1111
<artifactId>parent</artifactId>
1212
<groupId>com.sap.adt.abapcleaner</groupId>
13-
<version>1.18.2-SNAPSHOT</version>
13+
<version>1.19.0</version>
1414
<relativePath>../</relativePath>
1515
</parent>
1616

com.sap.adt.abapcleaner.updatesite/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
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">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>com.sap.adt.abapcleaner.updatesite</artifactId>
5-
<version>1.18.2-SNAPSHOT</version>
5+
<version>1.19.0</version>
66
<name>ABAP Cleaner for ABAP Development Tools (ADT)</name>
77
<packaging>eclipse-repository</packaging>
88

99
<parent>
1010
<artifactId>parent</artifactId>
1111
<groupId>com.sap.adt.abapcleaner</groupId>
12-
<version>1.18.2-SNAPSHOT</version>
12+
<version>1.19.0</version>
1313
<relativePath>../</relativePath>
1414
</parent>
1515

com.sap.adt.abapcleaner/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: com.sap.adt.abapcleaner;singleton:=true
5-
Bundle-Version: 1.18.2.qualifier
5+
Bundle-Version: 1.19.0
66
Bundle-Vendor: %Provider-Name
77
Bundle-Localization: plugin
88
Bundle-RequiredExecutionEnvironment: JavaSE-17

com.sap.adt.abapcleaner/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.sap.adt.abapcleaner</groupId>
55
<artifactId>com.sap.adt.abapcleaner</artifactId>
6-
<version>1.18.2-SNAPSHOT</version>
6+
<version>1.19.0</version>
77
<name>com.sap.adt.abapcleaner</name>
88
<packaging>eclipse-plugin</packaging>
99

1010
<parent>
1111
<artifactId>parent</artifactId>
1212
<groupId>com.sap.adt.abapcleaner</groupId>
13-
<version>1.18.2-SNAPSHOT</version>
13+
<version>1.19.0</version>
1414
<relativePath>../</relativePath>
1515
</parent>
1616

com.sap.adt.abapcleaner/src/com/sap/adt/abapcleaner/programbase/Program.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public static String getVersion() {
6262

6363
public static Release[] getReleases() {
6464
return new Release[] {
65+
Release.create("1.19.0", 2024, 9, 18),
6566
Release.create("1.18.0", 2024, 7, 8),
6667
Release.create("1.17.0", 2024, 6, 24),
6768
Release.create("1.16.0", 2024, 4, 12),

docs/images/profiles.png

-538 Bytes
Loading
60 Bytes
Loading

docs/release-notes.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@ as well as bugfixes of reported issues, i.e. anything that enhances or changes t
66
For a complete list of changes (including documentation, tests, refactoring etc.), please refer to
77
the list of [commits](../../../commits/main).
88

9+
## 2024-09-18 (version 1.19.0)
10+
11+
**Thanks a lot**, [**MDagni**](https://github.com/MDagni) for opening the issue that led to the bugfix!
12+
13+
* **Enhanced** parser, object model and UI **for Data Definition Language (DDL)**
14+
* Added new DDL rule '**Standardize annotation layout**'
15+
* Added new DDL rule '**Rearrange annotations**'
16+
* Added new DDL rule '**Break before DEFINE etc.**'
17+
* Added new DDL rule '**Break before AS SELECT etc.**'
18+
* Added new DDL rule '**Break before JOINs**'
19+
* Added new DDL rule '**Break before ASSOCIATIONs**'
20+
* Added new DDL rule '**Break before select list braces**'
21+
* Added new DDL rule '**Break before WHERE clause etc.**'
22+
* Added new DDL rule '**Standardize spaces around colon, comma etc.**'
23+
* Added new DDL rule '**Standardize spaces around brackets**'
24+
* Added new DDL rule '**Use CamelCase for known entity and field names**'
25+
* Added new DDL rule '**Correct frequent typos in DDL comments**'
26+
* Added new DDL rule '**Align view parameters**'
27+
* Added new DDL rule '**Align source parameters**'
28+
* Added new DDL rule '**Align function parameters after =>**'
29+
* Added new DDL rule '**Align logical expressions in views**'
30+
* Added new DDL rule '**Align name list and GROUP BY list**'
31+
* Added new DDL rule '**Align JOINs and ASSOCIATIONs**'
32+
* Added new DDL rule '**Align select list**'
33+
* Added new DDL rule '**Standardize empty lines between sections**'
34+
* Added new DDL rule '**Standardize empty lines within sections**'
35+
* Profiles editor: Made **height of rule references** section **flexible**
36+
* Fixed rule '**Make implicit type explicit**' for constant used as length in parentheses ([#350](../../../issues/350))
37+
* Updated **known CamelCase names** for CDS views and fields
38+
939
## 2024-07-15 (version 1.18.1)
1040

1141
Great **thanks** to [**suynwa**](https://github.com/suynwa) for the bug report behind this fix!

docs/rules.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Available Cleanup Rules
22

3-
ABAP cleaner offers 75 cleanup rules with a total of 301 configuration options:
3+
ABAP cleaner offers 96 cleanup rules with a total of 446 configuration options:
44

55
## Empty Lines
66

@@ -98,5 +98,41 @@ ABAP cleaner offers 75 cleanup rules with a total of 301 configuration options:
9898
* [Align FORM declarations](rules/AlignFormDeclarationRule.md)
9999
* [Align PERFORM parameters](rules/AlignPerformRule.md)
100100

101+
## DDL Annotations
102+
103+
* [Standardize annotation layout](rules/DdlAnnotationLayoutRule.md)
104+
* [Rearrange annotations](rules/DdlAnnotationNestingRule.md)
105+
106+
## DDL Line Breaks and Indent
107+
108+
* [Break before DEFINE etc.](rules/DdlPositionDefineRule.md)
109+
* [Break before AS SELECT etc.](rules/DdlPositionSelectRule.md)
110+
* [Break before JOINs](rules/DdlPositionJoinRule.md)
111+
* [Break before ASSOCIATIONs](rules/DdlPositionAssociationRule.md)
112+
* [Break before select list braces](rules/DdlPositionBracesRule.md)
113+
* [Break before WHERE clause etc.](rules/DdlPositionClausesRule.md)
114+
115+
## DDL Spaces and Spelling
116+
117+
* [Standardize spaces around colon, comma etc.](rules/DdlSpacesAroundSignsRule.md)
118+
* [Standardize spaces around brackets](rules/DdlSpacesAroundBracketsRule.md)
119+
* [Use CamelCase for known entity and field names](rules/DdlCamelCaseNameRule.md)
120+
* [Correct frequent typos in DDL comments](rules/DdlTypoRule.md)
121+
122+
## DDL Alignment
123+
124+
* [Align view parameters](rules/DdlAlignEntityParametersRule.md)
125+
* [Align source parameters](rules/DdlAlignSourceParametersRule.md)
126+
* [Align function parameters after =>](rules/DdlAlignFunctionParametersRule.md)
127+
* [Align logical expressions in views](rules/DdlAlignLogicalExpressionsRule.md)
128+
* [Align name list and GROUP BY list](rules/DdlAlignFieldListsRule.md)
129+
* [Align JOINs and ASSOCIATIONs](rules/DdlAlignDataSourcesRule.md)
130+
* [Align select list](rules/DdlAlignSelectListRule.md)
131+
132+
## DDL Empty Lines
133+
134+
* [Standardize empty lines between sections](rules/DdlEmptyLinesBetweenSectionsRule.md)
135+
* [Standardize empty lines within sections](rules/DdlEmptyLinesWithinSectionsRule.md)
136+
101137
[**Back to first page**](../README.md)
102138

docs/rules/AlignPerformRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[<-- previous rule](AlignFormDeclarationRule.md) | [overview](../rules.md) | next rule -->
1+
[<-- previous rule](AlignFormDeclarationRule.md) | [overview](../rules.md) | [next rule -->](DdlAnnotationLayoutRule.md)
22

33
# Align PERFORM parameters
44

docs/rules/DdlAlignDataSourcesRule.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
[<-- previous rule](DdlAlignFieldListsRule.md) | [overview](../rules.md) | [next rule -->](DdlAlignSelectListRule.md)
2+
3+
# Align JOINs and ASSOCIATIONs
4+
5+
Aligns the data sources, aliases and ON conditions of SELECT FROM, JOINs and ASSOCIATIONs.
6+
7+
Whether to break ON conditions to the next line is configured in 'Break before JOINs'.
8+
9+
## Options
10+
11+
* \[X\] Align data sources
12+
* \[X\] Align aliases
13+
* \[X\] Align ON conditions that continue on the same line
14+
* \[ \] Align ASSOCIATIONs together with JOINs
15+
* \[ \] Consider all lines of multi-line parameter assignments
16+
17+
## Examples
18+
19+
20+
```ASDDLS
21+
22+
// Depending on configuration in 'Break before JOINs',
23+
// ON conditions were either moved to the next line ...
24+
define view I_AnyView
25+
as select from I_AnySource as AnyAlias
26+
27+
left outer join I_OtherSource as OtherAlias
28+
on AnyAlias.AnyField = OtherAlias.AnyField
29+
30+
inner join I_ThirdSourceWithLongName as ThirdAliasWithLongName
31+
on AnyAlias.AnyField = ThirdAliasWithLongName.AnyField
32+
and AnyAlias.OtherField = ThirdAliasWithLongName.OtherField
33+
34+
left outer to one join I_FourthSource( P_AnyParam : 'any literal'
35+
P_OtherParam : 42 ) as FourthAlias
36+
on AnyAlias.AnyField = FourthAlias.OtherField
37+
38+
association [0..*] to I_FifthSource as _FifthAlias
39+
on _FifthAlias.AnyField = AnyAlias.AnyField
40+
41+
association [0..1] to I_SixthSourceWithLongName as _SixthAlias
42+
on _SixthAlias.AnyField = AnyAlias.AnyField
43+
and _SixthAlias.OtherField = AnyAlias.OtherField
44+
and _SixthAlias.ThirdField = ThirdAlias.ThirdField
45+
46+
{
47+
key AnyAlias.AnyField,
48+
OtherAlias.OtherField,
49+
ThirdAlias.ThirdField,
50+
FourthAlias.FourthField
51+
}
52+
53+
// ... or the ON conditions continue after the alias:
54+
union all
55+
select from I_AnySource2 as AnyAlias
56+
57+
left outer join I_OtherSource2 as OtherAlias on AnyAlias.AnyField = OtherAlias.AnyField
58+
59+
inner join I_ThirdSourceWithLongName2 as ThirdAliasWithLongName on AnyAlias.AnyField = ThirdAliasWithLongName.AnyField
60+
and AnyAlias.OtherField = ThirdAliasWithLongName.OtherField
61+
62+
left outer to one join I_FourthSource2( P_AnyParam : 'any literal'
63+
P_OtherParam : 42 ) as FourthAlias on AnyAlias.AnyField = FourthAlias.OtherField
64+
65+
association [0..*] to I_FifthSource2 as _FifthAlias on _FifthAlias.AnyField = AnyAlias.AnyField
66+
67+
association [0..1] to I_SixthSourceWithLongName2 as _SixthAlias on _SixthAlias.AnyField = AnyAlias.AnyField
68+
and _SixthAlias.OtherField = AnyAlias.OtherField
69+
and _SixthAlias.ThirdField = ThirdAlias.ThirdField
70+
71+
{
72+
key AnyAlias.AnyField,
73+
OtherAlias.OtherField,
74+
ThirdAlias.ThirdField,
75+
FourthAlias.FourthField
76+
}
77+
```
78+
79+
Resulting code:
80+
81+
```ASDDLS
82+
83+
// Depending on configuration in 'Break before JOINs',
84+
// ON conditions were either moved to the next line ...
85+
define view I_AnyView
86+
as select from I_AnySource as AnyAlias
87+
88+
left outer join I_OtherSource as OtherAlias
89+
on AnyAlias.AnyField = OtherAlias.AnyField
90+
91+
inner join I_ThirdSourceWithLongName as ThirdAliasWithLongName
92+
on AnyAlias.AnyField = ThirdAliasWithLongName.AnyField
93+
and AnyAlias.OtherField = ThirdAliasWithLongName.OtherField
94+
95+
left outer to one join I_FourthSource( P_AnyParam : 'any literal'
96+
P_OtherParam : 42 ) as FourthAlias
97+
on AnyAlias.AnyField = FourthAlias.OtherField
98+
99+
association [0..*] to I_FifthSource as _FifthAlias
100+
on _FifthAlias.AnyField = AnyAlias.AnyField
101+
102+
association [0..1] to I_SixthSourceWithLongName as _SixthAlias
103+
on _SixthAlias.AnyField = AnyAlias.AnyField
104+
and _SixthAlias.OtherField = AnyAlias.OtherField
105+
and _SixthAlias.ThirdField = ThirdAlias.ThirdField
106+
107+
{
108+
key AnyAlias.AnyField,
109+
OtherAlias.OtherField,
110+
ThirdAlias.ThirdField,
111+
FourthAlias.FourthField
112+
}
113+
114+
// ... or the ON conditions continue after the alias:
115+
union all
116+
select from I_AnySource2 as AnyAlias
117+
118+
left outer join I_OtherSource2 as OtherAlias on AnyAlias.AnyField = OtherAlias.AnyField
119+
120+
inner join I_ThirdSourceWithLongName2 as ThirdAliasWithLongName on AnyAlias.AnyField = ThirdAliasWithLongName.AnyField
121+
and AnyAlias.OtherField = ThirdAliasWithLongName.OtherField
122+
123+
left outer to one join I_FourthSource2( P_AnyParam : 'any literal'
124+
P_OtherParam : 42 ) as FourthAlias on AnyAlias.AnyField = FourthAlias.OtherField
125+
126+
association [0..*] to I_FifthSource2 as _FifthAlias on _FifthAlias.AnyField = AnyAlias.AnyField
127+
128+
association [0..1] to I_SixthSourceWithLongName2 as _SixthAlias on _SixthAlias.AnyField = AnyAlias.AnyField
129+
and _SixthAlias.OtherField = AnyAlias.OtherField
130+
and _SixthAlias.ThirdField = ThirdAlias.ThirdField
131+
132+
{
133+
key AnyAlias.AnyField,
134+
OtherAlias.OtherField,
135+
ThirdAlias.ThirdField,
136+
FourthAlias.FourthField
137+
}
138+
```
139+
140+
## Related code
141+
142+
* [Rule implementation](../../com.sap.adt.abapcleaner/src/com/sap/adt/abapcleaner/rules/ddl/alignment/DdlAlignDataSourcesRule.java)
143+
* [Tests](../../test/com.sap.adt.abapcleaner.test/src/com/sap/adt/abapcleaner/rules/ddl/alignment/DdlAlignDataSourcesTest.java)
144+

0 commit comments

Comments
 (0)