Skip to content

Commit

Permalink
client: better unused detection
Browse files Browse the repository at this point in the history
updated changlelog
  • Loading branch information
APerricone committed Feb 12, 2021
1 parent f39ad38 commit a6fa355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to the "Harbour and xHarbour" extension will be documented i
# 0.9.14
- **server** better performance on long splitted line [#68](https://github.com/APerricone/harbourCodeExtension/issues/68)
- **server** first support for [semantic token](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide)
- **server** first support for [reference](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#find-all-references-to-a-symbol)
- **validation** hightlight of unused symbol
- **syntax** added shared keyword [#64](https://github.com/APerricone/harbourCodeExtension/issues/64)

# 0.9.13
- **debugger** better stability
Expand Down
4 changes: 2 additions & 2 deletions client/src/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function validate(textDocument)
}
args.push("-I"+pathVal);
}
args = args.concat(section.extraOptions.split(" ").filter(function(el) {return el.length != 0}));
args = args.concat(section.extraOptions.split(" ").filter(function(el) {return el.length != 0 || el=="-ge1"}));
var diagnostics = {};
diagnostics[textDocument.fileName] = [];
function parseLine(subLine)
Expand Down Expand Up @@ -78,7 +78,7 @@ function validate(textDocument)
putAll = false;
var diag = new vscode.Diagnostic(new vscode.Range(lineNr,m.index,lineNr,m.index+subject[0].length), r[4],
r[3]=="Warning"? vscode.DiagnosticSeverity.Warning : vscode.DiagnosticSeverity.Error)
if(r[4].indexOf("declared but not used in function")>0) {
if(r[4].indexOf("not used")>0) {
diag.tags = [vscode.DiagnosticTag.Unnecessary];
}
diagnostics[r[1]].push(diag)
Expand Down

0 comments on commit a6fa355

Please sign in to comment.