NEW @W-17977608@ CSV output format for rules - #326
Conversation
stephen-carter-at-sf
left a comment
There was a problem hiding this comment.
I think you are missing the command help text updates.
Also why is graph engine creating files still locally? Let’s not check these in - we should make it so these don’t get created locally
| } | ||
| } | ||
|
|
||
| export class NewlineDescriptionEnginePlugin extends engApi.EnginePluginV1 { |
There was a problem hiding this comment.
Instead of creating yet another plugin and engine, consider just modifying the description for stub1RuleA or something with a newline and I would also suggest we add in various quotes as well.
Notice how we did this with the violation on line 365 above.
This should prevent us from having to have another file inside of exectedOutputFiles ... i.e. can we remove ruleSelectionWithNewlines.goldfile.csv in favor of just updating multipleRules.goldfile.csv
There was a problem hiding this comment.
Yeah, modifying the rule description is probably a good idea. I'll look into that.
There was a problem hiding this comment.
Thanks. is this used anymore? If not, then can we remove it and its corresponding engine?
The command help text is on the CLI side, right? |
| const complicatedRuleSelection: RuleSelectionImpl = new RuleSelectionImpl(); | ||
| const rule1: RuleImpl = new RuleImpl('stubEngine1', { | ||
| name: 'stub1RuleA', | ||
| severityLevel: SeverityLevel.Moderate, | ||
| tags: ['Recommended', 'CodeStyle'], | ||
| description: 'A rule description that contains\na new line character, as well as `ticks`, "double quotes", \'single quotes\,\n<brackets>, and even {curly braces}!', | ||
| resourceUrls: ['https://example.com/stub1RuleA', 'https://example.com/stub1RuleA_2'] | ||
| }); | ||
| const rule2: RuleImpl = new RuleImpl('stubEngine1', { | ||
| name: 'stub1RuleB', | ||
| severityLevel: SeverityLevel.Low, | ||
| tags: ['Recommended', 'Performance'], | ||
| description: 'A simple description this time', | ||
| resourceUrls: [] | ||
| }); | ||
| complicatedRuleSelection.addRule(rule1); | ||
| complicatedRuleSelection.addRule(rule2); |
There was a problem hiding this comment.
Rather than modify the actual hardcoded description of any of the stub rules (which would have likely impacted other tests), I decided it was just easier to instantiate a rule selection from scratch with some made up rules.
It's my opinion that this is acceptable, but I'm prepared for disagreement.
No description provided.