diff --git a/user_manual/cook-book/introduction.rst b/user_manual/cook-book/introduction.rst index 55be1b2..89e56fd 100644 --- a/user_manual/cook-book/introduction.rst +++ b/user_manual/cook-book/introduction.rst @@ -12,7 +12,7 @@ Prerequisites |GNATformat| setup --------------------- - * *(on Windows)* run the installer, and place :file:`\bin` in + * *(on Windows)* run the installer, and place :file:`/bin` in your :envvar:`$PATH` * *(on \*NIX)* extract the installation directory from the archive, and place @@ -35,8 +35,7 @@ https://gcc.gnu.org/onlinedocs/gnat-style.pdf For more information about the tool, the full manual is available at - * :file:`/share/doc/gnatformat/html` - -And online at https://docs.adacore.com/live/wave/gnatformat/html/gnatformat/index.html. + * in your installation folder, under :file:`/share/doc/gnatformat/html` + * online, at https://docs.adacore.com/live/wave/gnatformat/html/user-guide/index.html diff --git a/user_manual/user-guide/configuration.rst b/user_manual/user-guide/configuration.rst index b48c7f2..d616dc5 100644 --- a/user_manual/user-guide/configuration.rst +++ b/user_manual/user-guide/configuration.rst @@ -36,14 +36,16 @@ switch and its usage is limited for development proposes. The project file attributes --------------------------- -The formatting of your sources can be customized through the (:file:`.gpr`) project file by defining +The formatting of your sources can be customized through the :file:`.gpr` project file by defining a specific package called ``package Format``. + In this package all the attributes corresponding to the command line arguments can be added. There is -a one to one correspondence between the command line arguments and (:file:`.gpr`) project file attributes. +a one to one correspondence between the command line arguments and project file attributes. + The attribute has the same functionality as its associated command line argument and can be customized in order to comply with a specific source code formatting use case. -The lines below shows the implementation of the ``Format`` package as part of project file (:file:`.gpr`):: +The lines below shows the implementation of the ``Format`` package as part of the project file :file:`.gpr`:: package Format is diff --git a/user_manual/user-guide/introduction.rst b/user_manual/user-guide/introduction.rst index ba3943a..1b424a0 100644 --- a/user_manual/user-guide/introduction.rst +++ b/user_manual/user-guide/introduction.rst @@ -11,7 +11,7 @@ to the coding style described in the |GNAT-Style| available online at https://gcc.gnu.org/onlinedocs/gnat-style.pdf. |GNATformat| is available as a command line tool or as a library on the -platforms +following platforms * Windows (64-bits) * Linux (64-bits) diff --git a/user_manual/user-guide/usage.rst b/user_manual/user-guide/usage.rst index 15b7aa3..059cf01 100644 --- a/user_manual/user-guide/usage.rst +++ b/user_manual/user-guide/usage.rst @@ -39,17 +39,18 @@ The specific options allowing to customize the formatting of your sources are: * ``--unparsing-configuration``: allows to specify a custom unparsing configuration file to be used instead of the default one. -* ``--width``: allows to specify the maximum line length. - In the absence of this, the default value is ``79``. -* ``--indentation``: allows to specify the indentation size. - In the absence of this, the default value is ``3``. +* ``--width, -w``: allows to specify the maximum line length. + In the absence of this option, the default value is ``79``. +* ``--indentation, -i``: allows to specify the indentation size. + In the absence of this option, the default value is ``3``. * ``--indentation-kind``: allows to specify the indentation kind (i.e., ``tabs`` or ``spaces``). - In the absence of this, the choice by default is ``spaces``. + In the absence of this option, the choice by default is ``spaces``. * ``--indentation-continuation``: allows to specify the continuation line indentation size. - In the absence of this, the default value is ``indentation - 1``. + In the absence of this option, the default value is ``indentation - 1``. * ``--end-of-line``: allows you to choose the end of line sequence (i.e., ``lf`` or ``crlf``). - In the absence of this, the default value is ``lf``. + In the absence of this option, the default value is ``lf``. * ``--charset``: allows you to specify the charset to use for source decoding. + In absence of this option, the default value is ``iso-8859-1``. As a libray ----------- @@ -70,10 +71,11 @@ and the entry point is the function ``Gnatformat.Formatting.Format`` having the -- Configuration. where: -* the ``Unit`` is a Libadalang analysis unit node correspondin to the file to be formatted -* the ``Format_Options`` are formatting the options that are specified through the (:file:`.gpr`) - project file -* the ``Configuration`` uses a predefined configuration, i.e. the `Default_Unparsing_Configuration`, + +* ``Unit`` is a Libadalang analysis unit node correspondin to the file to be formatted, +* ``Format_Options`` are formatting the options that are specified through the (:file:`.gpr`) + project file, +* ``Configuration`` uses a predefined configuration, i.e. the `Default_Unparsing_Configuration`, that implements the formatting rules according to the coding style described in the |GNAT-Style| guide.