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

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Oct 7, 2016
1 parent 832895a commit 291e3ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/goImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function listPackages(excludeImportedPkgs: boolean = false): Thenable<str
currentFileDirPath = currentFileDirPath.substr(0, 1).toUpperCase() + currentFileDirPath.substr(1);
}

// In case of multiple workspaces, find current workspace by checking if current file is
// In case of multiple workspaces, find current workspace by checking if current file is
// under any of the workspaces in $GOPATH
for (let i = 1; i < workspaces.length; i++) {
let possibleCurrentWorkspace = path.join(workspaces[i], 'src');
Expand All @@ -73,7 +73,7 @@ export function listPackages(excludeImportedPkgs: boolean = false): Thenable<str
let vendorIndex = pkg.indexOf('/vendor/');

// Check if current file and the vendor pkg belong to the same root project
// If yes, then vendor pkg can be replaced with its relative path to the "vendor" folder
// If yes, then vendor pkg can be replaced with its relative path to the "vendor" folder
if (vendorIndex > 0) {
let rootProjectForVendorPkg = path.join(currentWorkspace, pkg.substr(0, vendorIndex));
let relativePathForVendorPkg = pkg.substring(vendorIndex + 8);
Expand Down
1 change: 1 addition & 0 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ function getMissingTools(): Promise<string[]> {
}



export function getGoVersion(): Promise<SemVersion> {
if (goVersion) {
return Promise.resolve(goVersion);
Expand Down
6 changes: 3 additions & 3 deletions test/go.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ encountered.
let gopkgsPromise = new Promise<string[]>((resolve, reject) => {
cp.execFile(getBinPath('gopkgs'), [], (err, stdout, stderr) => {
let pkgs = stdout.split('\n').sort().slice(1);
if (vendorSupport){
if (vendorSupport) {
vendorPkgsFullPath.forEach(pkg => {
assert.equal(pkgs.indexOf(pkg) > -1, true, `Package not found by goPkgs: ${pkg}`);
});
Expand Down Expand Up @@ -445,11 +445,11 @@ encountered.
});

return Promise.all<string[]>([gopkgsPromise, listPkgPromise]).then((values: string[][]) => {
if (!vendorSupport){
if (!vendorSupport) {
let originalPkgs = values[0];
let updatedPkgs = values[1];
assert.equal(originalPkgs.length, updatedPkgs.length);
for (var index = 0; index < originalPkgs.length; index++) {
for (let index = 0; index < originalPkgs.length; index++) {
assert.equal(updatedPkgs[index], originalPkgs[index]);
}
}
Expand Down

0 comments on commit 291e3ed

Please sign in to comment.