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

How to add sample code to Clean ABAP? #338

Open
nununo opened this issue Jul 25, 2023 · 1 comment
Open

How to add sample code to Clean ABAP? #338

nununo opened this issue Jul 25, 2023 · 1 comment

Comments

@nununo
Copy link

nununo commented Jul 25, 2023

#337 proposed linking to another repository which contains sample code. This constitutes a security problem. But it raises a good point. It would be great if some of the rules in the guide could be complemented with sample code whenever relevant. Some of the rules already have some inline code and that's fine. But sometimes (like what's proposed by #337), maybe longer and more complete examples would be helpful.

While I still don't know the best way to do this, I decided to open this issue to start a discussion about it.

I see two possible solutions (and I favour the first one):

A folder containing all the samples, one sample per file

Good: easy to consult by humans, easy to update, easy to link from the guide. The fact that everything stays under the same repository guarantees consistency;
Bad: Harder to install but... does it really matter?

Another github repository containing an abapGit repo

Good: it would be easy to install and test;
Bad: it's not easy to consult. I believe most of the times people won't need to install it. They'll want to look at it, read it and learn from it. And besides, if all the code is under the same abapGit package... you'd have to install the whole thing even if you'd only interested in a little bit. Not good.

Does it make sense to pursue this idea? If not, just close it 😄 Otherwise, let's have a go at it.

@ConjuringCoffee
Copy link
Contributor

Which rules do you think would benefit from additional sample code? I feel like the goal should be that each Clean ABAP style guide should make sense in itself. I'd like to keep the amount of additional sample code to a minimum. Right now, I don't see the need yet. 😉

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

No branches or pull requests

2 participants