Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent pretty print #96

Closed
mbtools opened this issue Sep 21, 2021 · 6 comments
Closed

Inconsistent pretty print #96

mbtools opened this issue Sep 21, 2021 · 6 comments

Comments

@mbtools
Copy link
Contributor

mbtools commented Sep 21, 2021

Some classes use all lower case while others are formatted with upper case keywords. It would be helpful for maintainers to settle on one setting (and then set abaplint rule keyword_case accordingly).

@AlexandreHT
Copy link
Contributor

Agreed. As a maintainer, I would like to reach a consensus among contributors before settling on one rule. Could everyone state its preferred option ?
(Mine is all lowercase)

@mbtools
Copy link
Contributor Author

mbtools commented Sep 22, 2021

In general, I use keyword upper case. But any setting will do since I use an exit to auto pretty print the code:
https://gist.github.com/mbtools/71aa345a8ccb8f375568f9f337569154

@pokrakam
Copy link
Contributor

While I would personally prefer lowercase, a large majority of the ABAP world uses keyword upper so I follow that trend.
Also see the Style Guides commentary on the topic.
https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/UpperVsLowerCase.md

In general I would recommend keyword upper for OSS projects as that will be 'normal' to the majority. If a customer downloads something and makes a small edit for whatever local reasons and out of habit presses shift-f1 then it becomes difficult to pick up future deltas.

Also see same discussion on ABAP2XLSX

@AlexandreHT
Copy link
Contributor

Thanks @mbtools for your exit. It's a game changer. I'll go for keyword uppercase for the repo (since the formatting is now automatic).

@andkopp
Copy link
Collaborator

andkopp commented Sep 23, 2021

I also prefer uppercase keywords, probably because I am used to it.
Automatic pretty print before committing would be really nice.

AlexandreHT added a commit that referenced this issue Oct 21, 2021
* Convert code to KEYWORD uppercase + add contributing

* Keyword uppercase

* Keyword uppercase
@AlexandreHT
Copy link
Contributor

Let's go for KEYWORD uppercase then.
I've

  • converted the codebase,
  • added to check to abaplint
  • created an issue at abapGit to request similar exits for other types of code (local type, test class, etc.)

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants