Skip to content

Commit

Permalink
Fix file path error
Browse files Browse the repository at this point in the history
  • Loading branch information
xferra committed Dec 15, 2016
1 parent 74ead72 commit e1af7ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Linterhub extension",
"author": "Repometric",
"license": "MIT",
"version": "0.1.2",
"version": "0.2.0",
"publisher": "Repometric",
"engines": {
"vscode": "^1.4.0"
Expand Down Expand Up @@ -69,7 +69,7 @@
"linterhub.mode": {
"type": "string",
"enum": [ "dotnet", "native", "docker" ],
"default": "native",
"default": "dotnet",
"description": "Run mode."
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "linterhub-extension-server",
"description": "Linterhub extension",
"version": "0.1.2",
"version": "0.2.0",
"author": "Repometric",
"license": "MIT",
"engines": {
Expand Down
6 changes: 5 additions & 1 deletion server/src/shared/linterhub-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export class LinterhubArgs {
return this.cliPath + `--mode=analyze --project=${this.project} --linter=jshint`;
}
analyzeFile(file: string): string {
return this.cliPath + `--mode=analyze --project=${this.project} --file=${file}`;
// TODO: Improve this code.
let normalizedPath = file.replace('file://', '')
.replace(this.project + '/', '')
.replace(this.project + '\\', '');
return this.cliPath + `--mode=analyze --project=${this.project} --file=${normalizedPath}`;
}
activate(linter: string): string {
return this.cliPath + `--mode=activate --project=${this.project} --active=true --linter=${linter}`;
Expand Down

0 comments on commit e1af7ef

Please sign in to comment.