Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Config files should be read bottom-up #133

Closed
Nurdok opened this issue Sep 17, 2015 · 3 comments
Closed

Config files should be read bottom-up #133

Nurdok opened this issue Sep 17, 2015 · 3 comments

Comments

@Nurdok
Copy link
Member

Nurdok commented Sep 17, 2015

Right now, pep257 reads config files from the directory of the common ancestor of the checked files, and goes on up and up, reading available config files as it goes. The problem here is that the correct semantic is that the closer a config file is to the checked file, the more priority it should get.

So a config file at the top of the repo should be overridden by a config file in the same directory of the checked file.

@Nurdok Nurdok added this to the Next release milestone Sep 17, 2015
@Nurdok
Copy link
Member Author

Nurdok commented Sep 22, 2015

There is also another complicated issue that should be fixed regarding this.
Consider the following directory structure:

A
+-- tox.ini
+-- B
    +-- tox.ini

If A/tox.ini contains ignore=D100 and B/tox.ini contains convention=pep257, the D100 error code should be checked. Meaning, it's not enough that closer-to-the-file config files should override same-flag values for more remote config files, but it should be done in a smart way such that any of select, ignore or convention override any of select, ignore or convention flags.

@Nurdok
Copy link
Member Author

Nurdok commented Sep 22, 2015

All the while, add-select and add-ignore should be cumulative.

@shacharoo
Copy link
Member

There should be a way to define "the top of the repo". My repo might be located within a "dirty" directory that contains temporary files, one of whom might be a sample tox.ini i'd like to keep there for some reason.

Nurdok added a commit that referenced this issue Oct 4, 2015
#133 - Better handling of configuration from files and CLI.
@Nurdok Nurdok closed this as completed Oct 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants