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

Commit

Permalink
Turn on no-consecutive-blank-lines linting rule (#2568)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartgrigg authored and ramya-rao-a committed Jun 12, 2019
1 parent 4011ba3 commit 5f26dc0
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/goBaseCodelens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export abstract class GoBaseCodeLensProvider implements vscode.CodeLensProvider
protected enabled: boolean = true;
private onDidChangeCodeLensesEmitter = new vscode.EventEmitter<void>();


public get onDidChangeCodeLenses(): vscode.Event<void> {
return this.onDidChangeCodeLensesEmitter.event;
}
Expand Down
2 changes: 0 additions & 2 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ export function updateGoPathGoRootFromConfig(): Promise<void> {
process.env[pathEnvVar] += path.delimiter + goRuntimeBasePath;
}


return new Promise<void>((resolve, reject) => {
cp.execFile(goRuntimePath, ['env', 'GOPATH', 'GOROOT'], (err, stdout, stderr) => {
if (err) {
Expand Down Expand Up @@ -502,7 +501,6 @@ export function offerToInstallTools() {
}
});


function promptForInstall(missing: string[], goVersion: SemVersion) {
const installItem = {
title: 'Install',
Expand Down
2 changes: 0 additions & 2 deletions src/goMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ export function activate(ctx: vscode.ExtensionContext): void {
const testCodeLensProvider = new GoRunTestCodeLensProvider();
const referencesCodeLensProvider = new GoReferencesCodeLensProvider();


ctx.subscriptions.push(vscode.languages.registerCodeActionsProvider(GO_MODE, new GoCodeActionProvider()));
ctx.subscriptions.push(vscode.languages.registerCodeLensProvider(GO_MODE, testCodeLensProvider));
ctx.subscriptions.push(vscode.languages.registerCodeLensProvider(GO_MODE, referencesCodeLensProvider));
Expand Down Expand Up @@ -504,7 +503,6 @@ export function activate(ctx: vscode.ExtensionContext): void {
});
}


if (updatedGoConfig['enableCodeLens']) {
testCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['runtest']);
referencesCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['references']);
Expand Down
1 change: 0 additions & 1 deletion src/goModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export async function getModFolderPath(fileuri: vscode.Uri): Promise<string> {
return goModEnvResult;
}


let moduleUsageLogged = false;
function logModuleUsage() {
if (moduleUsageLogged) {
Expand Down
2 changes: 0 additions & 2 deletions src/goOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ const goKindToCodeKind: { [key: string]: vscode.SymbolKind } = {
'struct': vscode.SymbolKind.Struct,
};


function convertToCodeSymbols(
document: vscode.TextDocument,
decls: GoOutlineDeclaration[],
Expand All @@ -130,7 +129,6 @@ function convertToCodeSymbols(
(decls || []).forEach(decl => {
if (!includeImports && decl.type === 'import') return;


if (decl.label === '_' && decl.type === 'variable') return;

const label = decl.receiverType
Expand Down
1 change: 0 additions & 1 deletion src/stateUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ export function updateGlobalState(key: string, value: any) {
export function setGlobalState(state: vscode.Memento) {
globalState = state;
}

1 change: 0 additions & 1 deletion src/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { getNonVendorPackages } from './goPackages';
import { getCurrentGoWorkspaceFromGOPATH, parseEnvFile } from './goPath';
import { getBinPath, getCurrentGoPath, getGoVersion, getToolsEnvVars, LineBuffer, resolvePath } from './util';


const sendSignal = 'SIGKILL';
const outputChannel = vscode.window.createOutputChannel('Go Tests');
const statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function resolveToolsGopath(): string {
}

export function getBinPath(tool: string): string {
const alternateTools: {[key: string]: string} = vscode.workspace.getConfiguration('go', null).get('alternateTools');
const alternateTools: { [key: string]: string } = vscode.workspace.getConfiguration('go', null).get('alternateTools');
const alternateToolPath: string = alternateTools[tool];

return getBinPathWithPreferredGopath(
Expand Down
1 change: 0 additions & 1 deletion test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ suite('GuessPackageNameFromFile Tests', () => {
.then(() => done(), done);
});
});

4 changes: 2 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"new-parens": true,
"no-arg": true,
"no-conditional-assignment": true,
// "no-consecutive-blank-lines": true,
"no-consecutive-blank-lines": true,
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
Expand Down Expand Up @@ -167,4 +167,4 @@
"check-type"
]
}
}
}

0 comments on commit 5f26dc0

Please sign in to comment.