Skip to content

Commit

Permalink
docs: nitpick fail when there's no style
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Aug 19, 2023
1 parent 28c0905 commit 612ca1f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
14 changes: 8 additions & 6 deletions README.rst
Expand Up @@ -350,6 +350,13 @@ Or install it with pip::
Run
~~~

Nitpick_ will fail if no style is explicitly configured.
Run this command to download and use the opinionated :gitref:`default style file <nitpick-style.toml>`:

nitpick init

You can use it as a template to :ref:`configure-your-own-style`.

To fix and modify your files directly::

nitpick fix
Expand All @@ -358,15 +365,10 @@ To check for errors only::

nitpick check

Nitpick is also a ``flake8`` plugin, so you can run this on a project
with at least one Python (``.py``) file::
Nitpick is also a flake8_ plugin, so you can run this on a project with at least one Python (``.py``) file::

flake8 .

Nitpick will download and use the opinionated `default style file <nitpick-style.toml>`_.

You can use it as a template to configure your own style.

Run as a pre-commit hook
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 4 additions & 2 deletions docs/configuration.rst
Expand Up @@ -18,7 +18,9 @@ Possible configuration files (in order of precedence):
The first file found will be used; the other files will be ignored.

Run the ``nipick init`` CLI command to create a config file (:ref:`cli_cmd_init`).
If no style is configured, Nitpick will fail with an error message.

Run ``nipick init`` to create a config file (:ref:`cli_cmd_init`).

To configure your own style, you can either use ``nitpick init``:

Expand Down Expand Up @@ -217,7 +219,7 @@ Multiple styles

You can also use multiple styles and mix local files and URLs.

Example of usage: the ``[tool.nitpick]`` table on :gitref:`Nitpick's own pyproject.toml <pyproject.toml#L1-L7>`.
Example of usage: the ``[tool.nitpick]`` table on :gitref:`Nitpick's own pyproject.toml <pyproject.toml>`.

.. code-block:: toml
Expand Down
11 changes: 7 additions & 4 deletions docs/quickstart.rst
Expand Up @@ -36,6 +36,13 @@ Or install it with pip::
Run
---

Nitpick_ will fail if no style is explicitly configured.
Run this command to download and use the opinionated :gitref:`default style file <nitpick-style.toml>`:

nitpick init

You can use it as a template to :ref:`configure-your-own-style`.

To fix and modify your files directly::

nitpick fix
Expand All @@ -48,10 +55,6 @@ Nitpick is also a flake8_ plugin, so you can run this on a project with at least

flake8 .

Nitpick_ will download and use the opinionated :gitref:`default style file <nitpick-style.toml>`.

You can use it as a template to :ref:`configure-your-own-style`.

Run as a pre-commit hook
------------------------

Expand Down

0 comments on commit 612ca1f

Please sign in to comment.