Tyrrrz / CliFx

Class-first framework for building command-line interfaces
MIT License
1.5k stars 61 forks source link

Allow specifying command options without a name #95

Closed dgarcia202 closed 3 years ago

dgarcia202 commented 3 years ago

Allows command options to provide neither a name nor a short name so a name will be generated by turning the property name to kebab case. Short names are not generated. If a short name has been provided no long name is generated.

Command options now can exists without an explicit name so one analyzer doesn't apply anymore. Also, the analyzer have been updated in such a way that a command option that would generate a name from the property that is too short will be marked as an error so we still avoid having option names shorter than two characters.

Tests updated.

Closes #84

Tyrrrz commented 3 years ago

Hi @dgarcia202!

Thanks for the PR. 🙂

I'm currently in the process of introducing a big refactoring in #94 that involves analyzers, the core library, and also tests. This means that after it's merged, there will be some conflicts between this PR and the master branch, but hopefully the overall implementation will be become simpler.

dgarcia202 commented 3 years ago

Hi,

Indeed I saw https://github.com/Tyrrrz/CliFx/pull/94 coming. No problem, I'll keep an eye on it. I will fix any conflicts that may arise after you merge. 👍

Tyrrrz commented 3 years ago

@dgarcia202 it is done! It was a total of 20'000 line refactor so the conflicts might be pretty severe 😅

Tyrrrz commented 3 years ago

Gonna close it for now due to inactivity, but feel free to reopen if you ever feel like working on it again (and it's fine if you don't too) 🙂