Skip to content

Better warnings when configuration directives in wrong section #3188

@0cjs

Description

@0cjs

Issue

As a new user to tox browsing through the rather long Configuration documentation, it wasn't entirely clear to me when in the middle of the page which particular section a directive should go in. I set ignore_base_python_conflict = false in the [testenv] section, but this did not take effect because it should have gone in the [tox] section.

I discovered this only because, for other reasons, I happened to be examining the output of tox config and noticed some # !!! unused: ignore_base_python_conflict lines in it.

It would be nice if tox could emit a warning during test runs in situations like this.

Additional Documentation Suggestion

Further, it might clarify the documentation somewhat if the "Core" and "tox environment" sections made it a bit more clear that each is talking about a different section of the configuration file. For example, after these headings a note could be added along the lines of:

Core

The following options belong in the [tox] section of tox.ini or the [tox:tox] section of setup.cfg.

...

tox environment

The following options belong in the [testenv] section of tox.ini or setup.cfg.

Alternatively, and perhaps better, would be to divide the "Configuration" page into three: a main page containing the first top-level section and two sub-pages containing the "Core" and "tox environment" sections, respectively.

(I can probably figure out how to submit a patch for the former documentation change; I don't know how to do the latter.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationenhancementhelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions