Skip to content

Commit f19e72d

Browse files
author
Arvid Paeglit
committed
lint related fixes. no logic changes
1 parent 74e9d96 commit f19e72d

9 files changed

Lines changed: 12 additions & 21 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ yalc.lock
66
.vscode-test
77
*.vsix
88
yarn-error.log
9+
.dccache

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
"yalc": "^1.0.0-pre.44"
251251
},
252252
"dependencies": {
253-
"@deepcode/tsc": "^2.0.0",
253+
"@deepcode/tsc": "file:.yalc/@deepcode/tsc",
254254
"lodash": "^4.17.19",
255255
"open": "^7.2.1"
256256
}

src/deepcode/DeepCodeExtension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as vscode from 'vscode';
22
import open from 'open';
3-
import { emitter } from '@deepcode/tsc';
43

54
import { ExtensionInterface } from '../interfaces/DeepCodeInterfaces';
65
import DeepCodeLib from './lib/modules/DeepCodeLib';
76
import createFileWatcher from './lib/watchers/FilesWatcher';
8-
import { ISupportedFiles } from '@deepcode/tsc';
7+
import { emitter, ISupportedFiles } from '@deepcode/tsc';
98

109
import {
1110
DEEPCODE_START_COMMAND,

src/deepcode/lib/analyzer/DeepCodeAnalyzer.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ class DeepCodeAnalyzer implements AnalyzerInterface {
150150
this.setIssuesMarkersDecoration();
151151
}
152152

153-
public async configureIssuesDisplayBySeverity(severity: number, hide: boolean): Promise<void> {
154-
this.SEVERITIES[severity].show = !hide;
155-
if (Object.keys(this.analysisResults.suggestions).length) {
156-
await this.createReviewResults();
157-
}
158-
}
159-
160153
public async updateReviewResultsPositions(
161154
extension: ExtensionInterface,
162155
updatedFile: openedTextEditorType,

src/deepcode/lib/deepCodeProviders/hoverProvider/DeepCodeHoverProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class DisposableHoverProvider implements vscode.Disposable {
1515
this.hoverProvider = vscode.languages.registerHoverProvider(
1616
{ scheme: "file", language: "*" },
1717
{
18-
provideHover(document, position, _token) {
18+
provideHover(document, position) {
1919
if (!deepcodeReview || !deepcodeReview.has(document.uri)) {
2020
return;
2121
}

src/deepcode/lib/modules/BundlesModule.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as vscode from "vscode";
2-
import * as _ from "lodash";
32

43
import { BundlesModuleInterface } from "../../../interfaces/DeepCodeInterfaces";
54

src/deepcode/lib/watchers/FilesWatcher.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ export default function createFileWatcher(
1010
const globPattern: vscode.GlobPattern = `**/\{${getGlobPatterns(supportedFiles).join(',')}\}`;
1111
const watcher = vscode.workspace.createFileSystemWatcher(globPattern);
1212

13-
const updateFiles = (filePath: string, extension: ExtensionInterface): void => {
13+
const updateFiles = (filePath: string): void => {
1414
extension.changedFiles.add(filePath);
1515
extension.startExtension(); // It's debounced, so not worries about concurrent calls
1616
};
1717

1818
watcher.onDidChange((documentUri: vscode.Uri) => {
19-
updateFiles(documentUri.fsPath, extension);
19+
updateFiles(documentUri.fsPath);
2020
});
2121
watcher.onDidDelete(async (documentUri: vscode.Uri) => {
22-
updateFiles(documentUri.fsPath, extension);
22+
updateFiles(documentUri.fsPath);
2323
});
2424
watcher.onDidCreate((documentUri: vscode.Uri) => {
25-
updateFiles(documentUri.fsPath, extension);
25+
updateFiles(documentUri.fsPath);
2626
});
2727

2828
return watcher;

src/interfaces/DeepCodeInterfaces.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,5 @@ export interface AnalyzerInterface {
122122
findSuggestion(suggestionName: string): ISuggestion | undefined;
123123
createReviewResults(): Promise<void>;
124124
updateReviewResultsPositions(extension: ExtensionInterface, updatedFile: openedTextEditorType): Promise<void>;
125-
configureIssuesDisplayBySeverity(severity: number, hide: boolean): Promise<void>;
126125
setIssuesMarkersDecoration(editor: TextEditor | undefined): void;
127126
}

src/test/suite/extension.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { ExtensionInterface } from "../../interfaces/DeepCodeInterfaces";
1111

1212
const testToken = '23';
1313
const mockedTestFilesDirPath = __dirname.replace("out/test", "src/test");
14-
const mockedFolderPath = vscode.Uri.parse('scheme:' + nodePath.join(mockedTestFilesDirPath, '/../mocked_data'), true)
15-
.fsPath;
14+
// const mockedFolderPath = vscode.Uri.parse('scheme:' + nodePath.join(mockedTestFilesDirPath, '/../mocked_data'), true)
15+
// .fsPath;
1616

1717
// pre test configuring extension
1818
const preTestConfigureExtension = () => {
@@ -29,9 +29,9 @@ const preTestConfigureExtension = () => {
2929
return testExtension;
3030
};
3131

32-
const uri = vscode.Uri.file(nodePath.join(mockedTestFilesDirPath, '../mocked_data/sample_repository', 'main.js'));
32+
// const uri = vscode.Uri.file(nodePath.join(mockedTestFilesDirPath, '../mocked_data/sample_repository', 'main.js'));
3333

34-
const testIgnoreComment = ' // deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>\n';
34+
// const testIgnoreComment = ' // deepcode ignore UseStrictEquality: <please specify a reason of ignoring this>\n';
3535

3636
suite("Deepcode Extension Tests", () => {
3737
let testExtension: ExtensionInterface;

0 commit comments

Comments
 (0)