-
Notifications
You must be signed in to change notification settings - Fork 54
@W-11494080@ Fix survey request formatting issue #773
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
Changes from all commits
2a855ff
40bc593
d9f983e
9b5a49d
51284f4
bae4ff4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module.exports = { | ||
| FEEDBACK_SURVEY_BANNER: `We're constantly improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://research.net/r/SalesforceCA.` | ||
| }; | ||
| surveyRequestMessage: `We're constantly improving Salesforce Code Analyzer. Tell us what you think! Give feedback at https://research.net/r/SalesforceCA.` | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,35 @@ import {SfdxCommand} from '@salesforce/command'; | |
| import {CategoryFilter, LanguageFilter, RuleFilter, RulesetFilter, RulenameFilter, EngineFilter} from './RuleFilter'; | ||
| import {uxEvents, EVENTS} from './ScannerEvents'; | ||
| import {stringArrayTypeGuard} from './util/Utils'; | ||
| import {AnyJson} from '@salesforce/ts-types'; | ||
|
|
||
| import {Messages} from '@salesforce/core'; | ||
|
|
||
| // Initialize Messages with the current plugin directory | ||
| Messages.importMessagesDirectory(__dirname); | ||
| const commonMessages = Messages.loadMessages('@salesforce/sfdx-scanner', 'common'); | ||
|
|
||
|
|
||
| export abstract class ScannerCommand extends SfdxCommand { | ||
|
|
||
| public async run(): Promise<AnyJson> { | ||
| this.runCommonSteps(); | ||
| return await this.runInternal(); | ||
| } | ||
|
|
||
| /** | ||
| * Command's should implement this method to add their | ||
| * working steps. | ||
| */ | ||
| abstract runInternal(): Promise<AnyJson>; | ||
|
|
||
| /** | ||
| * Common steps that should be run before every command | ||
| */ | ||
| protected runCommonSteps(): void { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A place to put common steps so that we don't have to modify each command every time we change things.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This being its own method feels excessive. You could just do these things in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| this.ux.warn(commonMessages.getMessage('surveyRequestMessage')); | ||
| } | ||
|
|
||
| protected buildRuleFilters(): RuleFilter[] { | ||
| const filters: RuleFilter[] = []; | ||
| // Create a filter for any provided categories. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.