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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is correct? Before, I've installed these manually to etc/uncrustify, and IMO that's more correct place for them. The difference is that etc is meant for users to look into and/or add their own files (this case), while share is generally meant only to software to look into, and should not be modified by the user.
As a result, if configs are not installed into etc, user would not even know of them unless he uses packaging tool to list all files installed by uncrustify package.
I suggest to either change it to etc/uncrustify, or to allow -c option to take a config name in addition to full path + implement another option to list available configs.
The reason will be displayed to describe this comment to others. Learn more.
Does uncrustify read these configuration files itself? And are users expected to edit them? Or are they just intended as examples?
The manpage says:
Basic Options:
-c CFG Use the config file CFG.
If not specified, uncrustify will use $UNCRUSTIFY_CONFIG or
$HOME/.uncrustify.cfg.
which seems to imply these files are only examples, not actually used unless the user manually selects them using -c? If so, then I think the current location under /usr/share is best. Putting them under /etc would be appropriate if editing them were to change the behavior of uncrustify. Yes?
ea69500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is correct? Before, I've installed these manually to
etc/uncrustify
, and IMO that's more correct place for them. The difference is thatetc
is meant for users to look into and/or add their own files (this case), whileshare
is generally meant only to software to look into, and should not be modified by the user.As a result, if configs are not installed into etc, user would not even know of them unless he uses packaging tool to list all files installed by uncrustify package.
I suggest to either change it to
etc/uncrustify
, or to allow-c
option to take a config name in addition to full path + implement another option to list available configs.ea69500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That... seems like a plausible argument: use
CMAKE_INSTALL_SYSCONFDIR
instead ofCMAKE_INSTALL_DATAROOTDIR
?ea69500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this works
ea69500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does uncrustify read these configuration files itself? And are users expected to edit them? Or are they just intended as examples?
The manpage says:
which seems to imply these files are only examples, not actually used unless the user manually selects them using -c? If so, then I think the current location under /usr/share is best. Putting them under /etc would be appropriate if editing them were to change the behavior of uncrustify. Yes?
ea69500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense as long as you imply EXAMPLESDIR (e.g.
${PREFIX}/share/examples/uncrustify
) and not DATADIR. Created #2560