Skip to content

Commit 7ed8096

Browse files
committed
Fix missing lint config filter option
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
1 parent 85e58b4 commit 7ed8096

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

extension/client/src/linter.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ export function initialise(context: ExtensionContext) {
5555

5656
if (filter && filter.description) {
5757
// Bad way to get the library for the filter ..
58-
const library = (filter.description.split(`/`)[0]).toLocaleUpperCase();
58+
const library: string = (filter.description.split(`/`)[0]).toLocaleUpperCase();
59+
60+
if (library.includes(`*`)) {
61+
window.showErrorMessage(`Cannot show lint config for a library filter.`);
62+
return;
63+
}
64+
5965
configPath = `${library}/VSCODE/RPGLINT.JSON`;
6066

6167
exists = (await connection.runCommand({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"view/item/context": [
6969
{
7070
"command": "vscode-rpgle.openLintConfig",
71-
"when": "view == objectBrowser && viewItem == filter",
71+
"when": "view == objectBrowser && viewItem =~ /^filter.*$/",
7272
"group": "1_LibActions@2"
7373
}
7474
]

0 commit comments

Comments
 (0)