Skip to content

Commit

Permalink
Update user manual
Browse files Browse the repository at this point in the history
  • Loading branch information
CKMonika committed Sep 2, 2024
1 parent 02c4033 commit 9c2dc9f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
7 changes: 3 additions & 4 deletions user_manual/cook-book/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Prerequisites
|GNATformat| setup
---------------------

* *(on Windows)* run the installer, and place :file:`<install_prefix>\bin` in
* *(on Windows)* run the installer, and place :file:`<install_prefix>/bin` in
your :envvar:`$PATH`

* *(on \*NIX)* extract the installation directory from the archive, and place
Expand All @@ -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:`<install_prefix>/share/doc/gnatformat/html`

And online at https://docs.adacore.com/live/wave/gnatformat/html/gnatformat/index.html.
* in your installation folder, under :file:`<install_prefix>/share/doc/gnatformat/html`

* online, at https://docs.adacore.com/live/wave/gnatformat/html/user-guide/index.html

8 changes: 5 additions & 3 deletions user_manual/user-guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion user_manual/user-guide/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 13 additions & 11 deletions user_manual/user-guide/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------
Expand All @@ -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.

Expand Down

0 comments on commit 9c2dc9f

Please sign in to comment.