Skip to content

Commit

Permalink
Update "Using a config file" README entry to document behavior with '…
Browse files Browse the repository at this point in the history
…-' in value fields

See codespell-project#3474 (comment)
  • Loading branch information
oddhack authored and DimitriPapadopoulos committed Jun 28, 2024
1 parent 73e3e28 commit 04c372b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,23 @@ which is read using Python's
`configparser <https://docs.python.org/3/library/configparser.html#supported-ini-file-structure>`_.
For example, comments are possible using ``;`` or ``#`` as the first character.

Values in an INI file entry cannot start with a ``-`` character, so if you need to do this,
structure your entries like this:

.. code-block:: ini
[codespell]
dictionary = mydict,-
ignore-words = bar,-foo
instead of these invalid entries:

.. code-block:: ini
[codespell]
dictionary = -,mydict
ignore-words = -foo,bar
Codespell will also check in the current directory for a ``pyproject.toml``
(or a path can be specified via ``--toml <filename>``) file, and the
``[tool.codespell]`` entry will be used, but only if the tomli_ package
Expand Down

0 comments on commit 04c372b

Please sign in to comment.