You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am looking for a setting to change the maximum line width to make ABAP cleaner automatically add line breaks where necessary (and also to prevent it from removing ones that were added manually). I found the rule "Align parameters and components" which has multiple settings for maximum line length:
The minimum seems to be 80 though. If I enter for example 61 it automatically resets to 80 after focus lost. 61 is way too low for any normal development, however, in printed literature that's the maximum that may fit on a line on a page.
Is there any technical reason for 80 being the minimum? Also are there any other rules I need to adjust?
The text was updated successfully, but these errors were encountered:
running ABAP cleaner to format code for printing is an interesting use case – and yes, 80 is somehow an arbitrary limit, so I now changed that to 60 (with the next release). Note, however, that ABAP cleaner does not guarantee to achieve this "Maximum line length" setting. It is rather a kind of 'decision help' for specific code places, where ABAP cleaner can decide whether to continue the line or to break to the next line. So, manual rework will still be needed, but maybe ABAP cleaner can help to reduce that. 60 chars is indeed very tight, given identifiers of 30 chars length.
You can find similar settings in the following places:
ABAP:
Standardize CLASS ... DEFINITION
Align declarations
Align CLEAR:, FREE:, SORT and CATCH
Align SELECT clauses
Align SELECT lists
Align parameters and components
Align conditional expressions
Align PERFORM parameters
DDL:
Standardize annotation layout
Align name list and GROUP BY list
(Yes, it might make sense to centralize these settings somewhere on the UI – currently, this is decentralized simply because we lack the "general configuration" place that applies for multiple rules).
Kind regards,
Jörg-Michael
jmgrassau
added a commit
to jmgrassau/abap-cleaner
that referenced
this issue
Dec 16, 2024
version 1.21.0, which was just released, now allows to lower the "maximum line length" to 60! As mentioned, this is no guarantee, but hopefully helps to reduce manual effort.
Hi, I am looking for a setting to change the maximum line width to make ABAP cleaner automatically add line breaks where necessary (and also to prevent it from removing ones that were added manually). I found the rule "Align parameters and components" which has multiple settings for maximum line length:
The minimum seems to be 80 though. If I enter for example 61 it automatically resets to 80 after focus lost. 61 is way too low for any normal development, however, in printed literature that's the maximum that may fit on a line on a page.
Is there any technical reason for 80 being the minimum? Also are there any other rules I need to adjust?
The text was updated successfully, but these errors were encountered: