Skip to content

Conversation

@jfeingold35
Copy link
Contributor

No description provided.

@jfeingold35 jfeingold35 force-pushed the d/W-17042378 branch 2 times, most recently from 3dd4dd2 to c9cfe64 Compare November 8, 2024 23:22
class Model {
constructor(data) {
(this.violations = this.processViolations(data)),
constructor(data2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these changes about renaming data to data2 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Marcelino made that rename. Josh basically just copied what he got from https://git.soma.salesforce.com/cli-scanner/code-analyzer-report/blob/main/dist/index.html

class Model {
constructor(data) {
(this.violations = this.processViolations(data)),
constructor(data2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Marcelino made that rename. Josh basically just copied what he got from https://git.soma.salesforce.com/cli-scanner/code-analyzer-report/blob/main/dist/index.html

<h1 class="logo">Salesforce</h1>
<h2 class="title">
<strong>Code Analyzer Report</strong> – {{###TIMESTAMP###}}
<strong>Code Analyzer Report</strong> – Jun 26th, 2024 3:24pm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Josh - we need to add back in the dynamic timestamp here.

}
})();
// === START OF VIOLATION DATA ===
const data = [{"rule":"stub1RuleA","engine":"stubEngine1","severity":4,"type":"Standard","tags":["Recommended","CodeStyle"],"file":"test/config.test.ts","line":3,"column":6,"endLine":11,"endColumn":8,"message":"SomeViolationMessage1","resources":["https://example.com/stub1RuleA"]},{"rule":"stub1RuleC","engine":"stubEngine1","severity":3,"type":"Standard","tags":["Recommended","Performance","Custom"],"file":"test/run.test.ts","line":21,"column":7,"endLine":25,"endColumn":4,"message":"SomeViolationMessage2","resources":["https://example.com/stub1RuleC","https://example.com/aViolationSpecificUrl1","https://example.com/violationSpecificUrl2"]},{"rule":"stub1RuleE","engine":"stubEngine1","severity":3,"type":"Standard","tags":["Performance"],"file":"test/run.test.ts","line":56,"column":4,"message":"Some Violation that contains\na new line in `it` and &quot;various&quot; &#39;quotes&#39;. Also it has &lt;brackets&gt; that may need to be {escaped}.","resources":["https://example.com/stub1RuleE","https://example.com/stub1RuleE_2"]},{"rule":"stub2RuleC","engine":"stubEngine2","severity":2,"type":"DataFlow","tags":["Recommended","BestPractice"],"file":"test/stubs.ts","line":76,"column":8,"primaryLocationIndex":2,"locations":[{"file":"test/stubs.ts","line":4,"column":13},{"file":"test/test-helpers.ts","line":9,"column":1},{"file":"test/stubs.ts","line":76,"column":8}],"message":"SomeViolationMessage3","resources":[]},{"rule":"stub3RuleA","engine":"stubEngine3","severity":3,"type":"Flow","tags":["Recommended","ErrorProne"],"file":"test/stubs.ts","line":90,"column":1,"endLine":95,"endColumn":10,"primaryLocationIndex":2,"locations":[{"file":"test/stubs.ts","line":20,"column":10,"endLine":22,"endColumn":25,"comment":"Comment at location 1"},{"file":"test/test-helpers.ts","line":5,"column":10,"comment":"Comment at location 2"},{"file":"test/stubs.ts","line":90,"column":1,"endLine":95,"endColumn":10}],"message":"SomeViolationMessage4","resources":[]}];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your files like test/config.test.ts should be test{{PATHSEP}}config.test.ts to make this gold file platform independent

@jfeingold35 jfeingold35 merged commit 91792c2 into dev Nov 12, 2024
@stephen-carter-at-sf stephen-carter-at-sf deleted the d/W-17042378 branch December 13, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants