Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Give user option for defualt rulesets #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mta-vscode-extension",
"displayName": "Migration Toolkit for Applications (MTA)",
"description": "Migration Toolkit for Applications (MTA)",
"version": "7.2.0",
"version": "7.2.1",
"license": "epl-2.0",
"publisher": "redhat",
"author": "Red Hat",
Expand Down
11 changes: 10 additions & 1 deletion resources/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,21 @@
},
{
"name": "rules",
"description": "User Rules Directory/File",
"description": "User Rules Directory/File, If ignored, enable-defualt-rulesets flag below.",
"type": "Path",
"ui-type": ["many", "file_or_directory", "text"],
"placeholder": "No Directories Specified",
"required": false,
"editable": true
},
{
"name": "enable-default-rulesets",
"description": "If set, defualt ruleset will be applied along with custom-rule. Note: Must specify rules if default rulesets are not enabled",
"type": "Boolean",
"ui-type": ["single"],
"required": true,
"editable": true
},
{
"name": "source-only",
"description": "Indicates whether the input is source code or compiled binaries.",
Expand All @@ -211,6 +219,7 @@
"required": true,
"editable": false
},

{
"name": "output",
"description": "The location of the generated analysis results.",
Expand Down
9 changes: 9 additions & 0 deletions src/server/analyzerUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ export class AnalyzerUtil {
});
}

if (options['enable-default-rulesets']) {
console.log('enable so setting to true');
params.push('--enable-default-rulesets=true');
}
else {
console.log('disable so setting to false');
params.push('--enable-default-rulesets=false');
}

console.log("Options: ")
for (const key in config.options) {
if (config.options.hasOwnProperty(key)) {
Expand Down
Loading