SAP / abap-file-formats

File formats that define and specify the file representation for ABAP development objects
MIT License
58 stars 55 forks source link

please avoid some special characters in file names #524

Open jfilak opened 1 year ago

jfilak commented 1 year ago

I know that the goal is to make it human readable but don't forget that we also want to write CI jobs where we have to use scripting.

Would it be possible to get rid of:

Example of OK characters:

ulrichauer commented 1 year ago
schneidermic0 commented 1 year ago

AFF specification so far: https://github.com/SAP/abap-file-formats/blob/main/docs/specification.md#file-names

For reserved characters see also: https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words

schneidermic0 commented 1 year ago

Thank you @jfilak for your feedback. I understand your use case.

However, as of now, I think I tend to keep the brackets/parenthesis (()) for objects with namespaces, because it's the best readable alternativ from my point of view. We could use other characters for name spaces, but they might lead to issues in other scenarios.

In any case we need to avoid following characters (as also mentioned by @ulrichauer):

jfilak commented 1 year ago

Gentlemen, period . is one of the most commonly used character and it is super OK to use it in file name. Why do you think we should not use it?

The only problem with asterisk is that shell could match a glob pattern which in the worst case leads to an error from the shell. So the verdict would be it is OK but use it only if no other option.

I do not get why do you think colon : and underscore _ are dangerous characters?

The brackets () are super dangerous because shells tends to execute the contents in a sub-shell. If you really need to use brackets then use curly braces {} or squar braces () which does not cause problems in shells.

ulrichauer commented 1 year ago

I do not get why do you think colon : and underscore _ are dangerous characters?

@jfilak Of course : and _ are not dangerous. But they are widely used in object names, so they are not suited as substitute for the namespace delimiters.