Repository Summary
Checkout URI | https://github.com/ament/uncrustify.git |
VCS Type | git |
VCS Version | ardent |
Last Updated | 2017-09-29 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
uncrustify | 0.61.20150413 |
README
Uncrustify
A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA
Features
- highly configurable - 590 configurable options as of version 0.65
-
add/remove spaces
- `sp_before_sparen`: _Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc._ - `sp_compare`: _Add or remove space around compare operator '<', '>', '==', etc_
</details>
-
add/remove newlines
- `nl_if_brace`: _Add or remove newline between 'if' and '{'_ - `nl_brace_while`: _Add or remove newline between '}' and 'while' of 'do' statement_
</details>
-
add/remove blanklines
- `eat_blanks_before_close_brace`: _Whether to remove blank lines before '}'_ - `nl_max`: _The maximum consecutive newlines (3 = 2 blank lines)_
</details>
-
indent code
- `indent_switch_case`: _indent_switch_case: Spaces to indent 'case' from 'switch'_ - `indent_class_colon`: _Whether to indent the stuff after a leading base class colon_
</details>
-
align code
- `align_func_params`: _Align variable definitions in prototypes and functions_ - `align_struct_init_span`: _The span for aligning struct initializer values (0=don't align)_
</details>
-
modify code
- `mod_full_brace_for`: _Add or remove braces on single-line 'for' statement_ - `mod_paren_on_return`: _Add or remove unnecessary paren on 'return' statement_
</details>
Here is an example configuration file, and here is a before and after C source example. That should give you a pretty good idea of what Uncrustify can do.
Binaries
Pre compiled binaries for Windows can be downloaded here.
Build
CMake is a tool that generates build systems (Makefiles, Visual Studio project files, Xcode project files and others).
To generate a build system for Uncrustify using CMake, create a build folder and run CMake from it:
$ mkdir build
$ cd build
$ cmake ..
(Use cmake -G Xcode ..
for Xcode)
Then use the build tools of your build system (in many cases this will
simply be make
, but on Windows it could be MSBuild or Visual Studio).
Or use CMake to invoke it:
$ cmake --build .
If testing is enabled, CMake generates a test
target, which you can
build using your build system tools (usually make test
). This can also
be invoked using CTest:
$ ctest -V -C Debug
There is also an install
target, which can be used to install the
Uncrustify executable (typically make install
).
A note on CMake configurations
Some build systems are single-configuration, which means you specify the
build type when running CMake (by setting the CMAKE_BUILD_TYPE
variable), and the generated files then build that configuration.
File truncated at 100 lines see the full file
CONTRIBUTING
Contributing to Uncrustify
How to contribute
There are lots of ways to contribute to Uncrustify:
- Report Issues
- Propose Features or Improvements
- Submit Pull Requests
Making changes
- Pull latest master and create a new branch:
- Branch name should use lowercase, using
-
to separate words and not_
. Other special characters should be avoided. - A hierarchical structure can be designated using
/
(e.g.area/topic
). The last part of the name can be keywords likebugfix
,feature
,optim
,docs
,refactor
,test
, etc. - Branches should be named after what the change is about
- Branches should not be named after the issue number, developer name, etc.
- Branch name should use lowercase, using
- Organize your work:
- Specialize your branch to target only one thing. Split your work in multiple branches if necessary
- Make commits of logical units
- Try to write a quality commit message:
- Separate subject line from body with a blank line
- Limit subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use imperative present tense in the subject line. A proper subject can complete the sentence If applied, this commit will, [subject].
- Wrap the body at 72 characters
- Include motivation for the change and contrast its implementation with previous behavior. Explain the what and why instead of how.
- Definition of done:
- The code is clean and documented where needed
- The change has to be complete (no upcoming fix-up commits)
- The change should always be accompanied by regression tests (explain why if not possible)
- Preparing a Pull Request (PR):
- To reduce the likelihood of conflicts and test failures, try to avoid merges, rebasing your work on top of latest master before creating a PR
- Verify that your code is properly formatted by running
scripts/Run_uncrustify_for_sources
- The PR title should represent what is being changed (a rephrasing of the branch name if set correctly)
- The PR description should document the why the change needed to be done and not how which should be obvious by doing the code review
Repository Summary
Checkout URI | https://github.com/ament/uncrustify.git |
VCS Type | git |
VCS Version | bouncy |
Last Updated | 2018-06-28 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
uncrustify_vendor | 0.66.1 |
README
Uncrustify
A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA
Features
- highly configurable - 609 configurable options as of version 0.66.1
-
add/remove spaces
- `sp_before_sparen`: _Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc._ - `sp_compare`: _Add or remove space around compare operator '<', '>', '==', etc_
</details>
-
add/remove newlines
- `nl_if_brace`: _Add or remove newline between 'if' and '{'_ - `nl_brace_while`: _Add or remove newline between '}' and 'while' of 'do' statement_
</details>
-
add/remove blanklines
- `eat_blanks_before_close_brace`: _Whether to remove blank lines before '}'_ - `nl_max`: _The maximum consecutive newlines (3 = 2 blank lines)_
</details>
-
indent code
- `indent_switch_case`: _indent_switch_case: Spaces to indent 'case' from 'switch'_ - `indent_class_colon`: _Whether to indent the stuff after a leading base class colon_
</details>
-
align code
- `align_func_params`: _Align variable definitions in prototypes and functions_ - `align_struct_init_span`: _The span for aligning struct initializer values (0=don't align)_
</details>
-
modify code
- `mod_full_brace_for`: _Add or remove braces on single-line 'for' statement_ - `mod_paren_on_return`: _Add or remove unnecessary paren on 'return' statement_
</details>
Here is an example configuration file, and here is a before and after C source example. That should give you a pretty good idea of what Uncrustify can do.
Binaries
Pre compiled binaries for Windows can be downloaded here.
Build
CMake is a tool that generates build systems (Makefiles, Visual Studio project files, Xcode project files and others).
To generate a build system for Uncrustify using CMake, create a build folder and run CMake from it:
$ mkdir build
$ cd build
$ cmake ..
(Use cmake -G Xcode ..
for Xcode)
Then use the build tools of your build system (in many cases this will
simply be make
, but on Windows it could be MSBuild or Visual Studio).
Or use CMake to invoke it:
$ cmake --build .
If testing is enabled, CMake generates a test
target, which you can
build using your build system tools (usually make test
). This can also
be invoked using CTest:
$ ctest -V -C Debug
There is also an install
target, which can be used to install the
Uncrustify executable (typically make install
).
A note on CMake configurations
Some build systems are single-configuration, which means you specify the
build type when running CMake (by setting the CMAKE_BUILD_TYPE
variable), and the generated files then build that configuration.
File truncated at 100 lines see the full file
CONTRIBUTING
Contributing to Uncrustify
How to contribute
There are lots of ways to contribute to Uncrustify:
- Report Issues
- Propose Features or Improvements
- Submit Pull Requests
Making changes
- Pull latest master and create a new branch:
- Branch name should use lowercase, using
-
to separate words and not_
. Other special characters should be avoided. - A hierarchical structure can be designated using
/
(e.g.area/topic
). The last part of the name can be keywords likebugfix
,feature
,optim
,docs
,refactor
,test
, etc. - Branches should be named after what the change is about
- Branches should not be named after the issue number, developer name, etc.
- Branch name should use lowercase, using
- Organize your work:
- Specialize your branch to target only one thing. Split your work in multiple branches if necessary
- Make commits of logical units
- Try to write a quality commit message:
- Separate subject line from body with a blank line
- Limit subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use imperative present tense in the subject line. A proper subject can complete the sentence If applied, this commit will, [subject].
- Wrap the body at 72 characters
- Include motivation for the change and contrast its implementation with previous behavior. Explain the what and why instead of how.
- Definition of done:
- The code is clean and documented where needed
- The change has to be complete (no upcoming fix-up commits)
- The change should always be accompanied by regression tests (explain why if not possible)
- Preparing a Pull Request (PR):
- To reduce the likelihood of conflicts and test failures, try to avoid merges, rebasing your work on top of latest master before creating a PR
- Verify that your code is properly formatted by running
scripts/Run_uncrustify_for_sources
- The PR title should represent what is being changed (a rephrasing of the branch name if set correctly)
- The PR description should document the why the change needed to be done and not how which should be obvious by doing the code review