Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit e309a11

Browse files
committed
feat: make beta rules active
1 parent e8bbd3e commit e309a11

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
},
154154
"dependencies": {
155155
"convert-array-to-csv": "^2.0.0",
156-
"lightning-flow-scanner-core": "4.32.5",
156+
"lightning-flow-scanner-core": "4.33.0",
157157
"tabulator-tables": "^6.3.1",
158158
"uuid": "^11.0.5",
159159
"xml2js": "^0.6.2"

src/commands/handlers.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ export default class Commands {
3030
}
3131

3232
private async configRules() {
33-
const allRules: core.IRuleDefinition[] = core.getRules();
33+
const allRules: core.IRuleDefinition[] = [
34+
...core.getBetaRules(),
35+
...core.getRules(),
36+
];
3437
const ruleConfig = { rules: {} };
3538

3639
let items = allRules.map((rule) => {
37-
return { label: rule.label, value: rule.name };
38-
});
39-
items.forEach((item) => {
40-
item['picked'] = true;
40+
return { label: rule.label, value: rule.name, picked: true };
4141
});
4242

4343
const selectedRules = (await vscode.window.showQuickPick(items, {
@@ -88,6 +88,10 @@ export default class Commands {
8888
);
8989
}
9090
await CacheProvider.instance.set('ruleconfig', ruleConfig);
91+
OutputChannel.getInstance().logChannel.debug(
92+
'Stored rule configurations',
93+
ruleConfig
94+
);
9195
}
9296

9397
private async debugView() {
@@ -149,6 +153,10 @@ export default class Commands {
149153
await this.configRules();
150154
}
151155
const ruleConfig = CacheProvider.instance.get('ruleconfig');
156+
OutputChannel.getInstance().logChannel.debug(
157+
'load stored rule configurations',
158+
ruleConfig
159+
);
152160
results = core.scan(await core.parse(selectedUris), ruleConfig);
153161
OutputChannel.getInstance().logChannel.debug('Scan Results', ...results);
154162
await CacheProvider.instance.set('results', results);

webviews/components/RuleOverview.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{#if betaRules}
1515
<div id="beta">
1616
<h2>Beta Rules</h2>
17-
<h3>Modify your .flow-scanner configuration file to take advantage of the beta rules</h3>
17+
<h3>Visit the documentation button for more details on beta rules</h3>
18+
<h4>Use Configure Rules button to opt on rules</h4>
1819
{#each betaRules as rule, i}
1920
<RuleCard>
2021
<span slot="label">{i + 1}. {rule.label}</span>

0 commit comments

Comments
 (0)