Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add the documentation of the new inline ignore comments #3390

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,27 @@ The words to ignore can be passed in two ways:

codespell -L word1,word2,word3,word4

Inline ignore
-------------

Some situation might require ignoring a specific word in a specific location. This can be achieved by adding a comment in the source code.
You can either ignore a single word or a list of words. The comment should be in the format of ``# codespell:ignore <words>``.
Words should be separated by a comma.

1. ignore specific word:

.. code-block:: python

def wrod() # codespell:ignore wrod
pass

2. ignore multiple words:

.. code-block:: python

def wrod(wrods) # codespell:ignore
pass

Using a config file
-------------------

Expand Down
Loading