Skip to content

Commit eb5e432

Browse files
authored
Merge pull request #4 from hhpatel14/defualt-rulesets
✨Give user option for defualt rulesets
2 parents ed3c6a8 + 88692d6 commit eb5e432

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mta-vscode-extension",
33
"displayName": "Migration Toolkit for Applications (MTA)",
44
"description": "Migration Toolkit for Applications (MTA)",
5-
"version": "7.2.0",
5+
"version": "7.2.1",
66
"license": "epl-2.0",
77
"publisher": "redhat",
88
"author": "Red Hat",

resources/help.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,21 @@
187187
},
188188
{
189189
"name": "rules",
190-
"description": "User Rules Directory/File",
190+
"description": "User Rules Directory/File, If ignored, enable-defualt-rulesets flag below.",
191191
"type": "Path",
192192
"ui-type": ["many", "file_or_directory", "text"],
193193
"placeholder": "No Directories Specified",
194194
"required": false,
195195
"editable": true
196196
},
197+
{
198+
"name": "enable-default-rulesets",
199+
"description": "If set, defualt ruleset will be applied along with custom-rule. Note: Must specify rules if default rulesets are not enabled",
200+
"type": "Boolean",
201+
"ui-type": ["single"],
202+
"required": true,
203+
"editable": true
204+
},
197205
{
198206
"name": "source-only",
199207
"description": "Indicates whether the input is source code or compiled binaries.",
@@ -211,6 +219,7 @@
211219
"required": true,
212220
"editable": false
213221
},
222+
214223
{
215224
"name": "output",
216225
"description": "The location of the generated analysis results.",

src/server/analyzerUtil.ts

+9
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ export class AnalyzerUtil {
217217
});
218218
}
219219

220+
if (options['enable-default-rulesets']) {
221+
console.log('enable so setting to true');
222+
params.push('--enable-default-rulesets=true');
223+
}
224+
else {
225+
console.log('disable so setting to false');
226+
params.push('--enable-default-rulesets=false');
227+
}
228+
220229
console.log("Options: ")
221230
for (const key in config.options) {
222231
if (config.options.hasOwnProperty(key)) {

0 commit comments

Comments
 (0)