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
Add option to enforce braces in If/for/while/.. code blocks #1016
Comments
Try: mod_full_brace_do |
doesnt works
… On 10 Feb 2017, at 14:44, CDanU ***@***.***> wrote:
Try:
mod_full_brace_do
mod_full_brace_for
mod_full_brace_function
mod_full_brace_if
mod_full_brace_if_chain
mod_full_brace_if_chain_only
mod_full_brace_if_chain
mod_full_brace_nl
mod_full_brace_while
mod_full_brace_using
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1016 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGIjG_xZnGTbJkc2Wom4vm7Y5Mv4y5KSks5rbGmmgaJpZM4L9X_D>.
|
To get exactly your expected result: # Uncrustify 0.64.414-g06cfd174
nl_if_brace = remove
mod_full_brace_if = force
# option(s) with 'not default' value: 2
# Input int main(int argc) {
if (argc> 2) printf ("Winrar\n");
} Output int main(int argc) {
if (argc> 2) {
printf ("Winrar\n");
}
} If that still does not work read and do what is stated in the ISSUE_TEMPLATE |
why its not working for me?
im using uncrustify from git and using a file with those 2 lines passed to uncrustify -c uncrustify.cfg foo.c
and the foo.c.uncrustify doesnt have this output
… On 10 Feb 2017, at 14:51, CDanU ***@***.***> wrote:
To get exactly your expected result:
# Uncrustify 0.64.414-g06cfd174
nl_if_brace = remove
mod_full_brace_if = force
# option(s) with 'not default' value: 2
#
Input
int main(int argc) {
if (argc> 2) printf ("Winrar\n");
}
Output
int main(int argc) {
if (argc> 2) {
printf ("Winrar\n");
}
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1016 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGIjGy2pB9iTDmzph3lVvcbF26ox9qeiks5rbGtOgaJpZM4L9X_D>.
|
nvm. that works! thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
input:
expected output:
The text was updated successfully, but these errors were encountered: