Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

disableWhenNoConfigFile not really working #455

Open
Cweet opened this issue Mar 11, 2020 · 0 comments
Open

disableWhenNoConfigFile not really working #455

Cweet opened this issue Mar 11, 2020 · 0 comments
Labels

Comments

@Cweet
Copy link

Cweet commented Mar 11, 2020

Something that bothered me when working in projects without a config file, it throws errors every time you click on a file, even when I have check on the "disableWhenNoConfigFile". The problem is that this check is not being executed early enough. By moving this check further up, right under "const parameters = ['--report=json'];" this issue is resolved.

// Check if a config file exists and handle it
const confFileNames = [
     '.phpcs.xml', '.phpcs.xml.dist', 'phpcs.xml', 'phpcs.xml.dist',
     'phpcs.ruleset.xml', 'ruleset.xml',
];
const confFile = await helpers.findAsync(fileDir, confFileNames);
if (this.disableWhenNoConfigFile && !confFile) {
     return [];
}
@UziTech UziTech added the bug label Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants