Update README.rst

This commit is contained in:
Peter Vingelmann 2016-09-24 03:15:59 +02:00
parent 5b3ab401d2
commit 1136d961a0

@ -60,4 +60,31 @@ recursive search (``-R``) option::
path/to/astyle -Q -R *.cpp *.hpp *.c *.h --print-changes
With the ``-Q`` option, astyle will only display information about the
formatted files (it will not list the unchanged files).
formatted files (it will not list the unchanged files).
Instead of copying ``.astylerc`` to your home folder, you can also specify
the options file directly. The file can change in the future, so this is the
recommended solution if you want to invoke astyle from your IDE::
cd my-project
path/to/astyle --options=/path/to/.astylerc -Q -R *.cpp *.hpp *.c *.h --print-changes
Running astyle with fabric (for Steinwurf projects)
---------------------------------------------------
For convenience, we also have fabric tasks to run astyle on Steinwurf projects.
The ``astyle.format_code`` task will format all C/C++ source files in the
selected project::
fab astyle.format_code:my-project
You can also add ``update_astyle=True`` to automatically update the astyle
project and build the latest binary::
fab astyle.format_code:my-project,update_astyle=True
The ``astyle.check_code`` task will not make any changes in the C/C++ source
files, it will only print the required changes in the selected project::
fab astyle.check_code:my-project