Skip to content

Commit 4efda9d

Browse files
authored
Disable linter in notebook cells (#12210)
For #12208 Disabled for MVP of Notebooks.
1 parent dc32568 commit 4efda9d

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

news/2 Fixes/12208.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disable linting in Notebook Cells.

src/client/linters/lintingEngine.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { IDocumentManager, IWorkspaceService } from '../common/application/types
1111
import { STANDARD_OUTPUT_CHANNEL } from '../common/constants';
1212
import { IFileSystem } from '../common/platform/types';
1313
import { IConfigurationService, IOutputChannel } from '../common/types';
14+
import { isNotebookCell } from '../common/utils/misc';
1415
import { StopWatch } from '../common/utils/stopWatch';
1516
import { IServiceContainer } from '../ioc/types';
1617
import { sendTelemetryWhenDone } from '../telemetry';
@@ -65,6 +66,9 @@ export class LintingEngine implements ILintingEngine {
6566
}
6667

6768
public async lintDocument(document: vscode.TextDocument, trigger: LinterTrigger): Promise<void> {
69+
if (isNotebookCell(document)) {
70+
return;
71+
}
6872
this.diagnosticCollection.set(document.uri, []);
6973

7074
// Check if we need to lint this document

0 commit comments

Comments
 (0)