Skip to content

Add tox.ini to the list of default config files #2087

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

Closed
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ Using a config file
Command line options can also be specified in a config file.

When running ``codespell``, it will check in the current directory for a file
named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
containing an entry named ``[codespell]``. Each command line argument can
be specified in this file (without the preceding dashes), for example::
named ``.codespellrc``, ``setup.cfg`` or ``tox.ini`` (or a file specified via
``--config``), containing an entry named ``[codespell]``. Each command line
argument can be specified in this file (without the preceding dashes), for
example::

[codespell]
skip = *.po,*.ts,./src/3rdParty,./src/Test
Expand Down
2 changes: 1 addition & 1 deletion codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def parse_options(args):
options = parser.parse_args(list(args))

# Load config files and look for ``codespell`` options.
cfg_files = ['setup.cfg', '.codespellrc']
cfg_files = ['tox.ini', 'setup.cfg', '.codespellrc']
if options.config:
cfg_files.append(options.config)
config = configparser.ConfigParser()
Expand Down