Skip to content

Commit

Permalink
Fix missing lint config filter option
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
  • Loading branch information
worksofliam committed Apr 29, 2024
1 parent 85e58b4 commit 7ed8096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion extension/client/src/linter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ export function initialise(context: ExtensionContext) {

if (filter && filter.description) {
// Bad way to get the library for the filter ..
const library = (filter.description.split(`/`)[0]).toLocaleUpperCase();
const library: string = (filter.description.split(`/`)[0]).toLocaleUpperCase();

if (library.includes(`*`)) {
window.showErrorMessage(`Cannot show lint config for a library filter.`);
return;
}

configPath = `${library}/VSCODE/RPGLINT.JSON`;

exists = (await connection.runCommand({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"view/item/context": [
{
"command": "vscode-rpgle.openLintConfig",
"when": "view == objectBrowser && viewItem == filter",
"when": "view == objectBrowser && viewItem =~ /^filter.*$/",
"group": "1_LibActions@2"
}
]
Expand Down

0 comments on commit 7ed8096

Please sign in to comment.