Skip to content

Commit f23439b

Browse files
authored
Fixes #26 Do not run linters when linters are disabled (#222)
* Fix microsoft/vscode#37627 (#1368) * check doc language and if linting is disabled
1 parent 5aaef3b commit f23439b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

python-0.7.0.vsix

6.09 MB
Binary file not shown.

src/client/providers/lintProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ export class LintProvider implements vscode.Disposable {
160160
const workspaceRootPath = (workspaceFolder && typeof workspaceFolder.uri.fsPath === 'string') ? workspaceFolder.uri.fsPath : undefined;
161161
const relativeFileName = typeof workspaceRootPath === 'string' ? path.relative(workspaceRootPath, document.fileName) : document.fileName;
162162
const settings = PythonSettings.getInstance(document.uri);
163+
if (document.languageId !== PythonLanguage.language || !settings.linting.enabled) {
164+
return;
165+
}
163166
const ignoreMinmatches = settings.linting.ignorePatterns.map(pattern => {
164167
return new Minimatch(pattern);
165168
});

0 commit comments

Comments
 (0)