Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@
);
}
getLocation(violation) {
const position = this.getPosition(violation);
return `<ul class="locations"><li><span class="file">${position ? `${violation.file} (${position})` : violation.file}</span></li></ul>`;
var _a, _b;
const position = this.getPosition(violation),
location = position
? `${violation.file} (${position})`
: violation.file,
comment =
(_b = (_a = violation.locations) == null ? void 0 : _a[0]) == null
? void 0
: _b.comment;
return `<ul class="locations"><li><span class="file">${location}</span>${comment ? `<span class="comment">${comment}</span>` : ""}</li></ul>`;
}
getLocationsList(violation) {
var _a;
Expand Down Expand Up @@ -1793,7 +1801,7 @@
Generated by Code Analyzer from path:

<!-- START OF RUNDIR -->
<span class="rundir">{{###RUNDIR###}}</span>
<code class="rundir">{{###RUNDIR###}}</code>
<!-- END OF RUNDIR -->

</p>
Expand Down
4 changes: 2 additions & 2 deletions packages/code-analyzer-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@salesforce/code-analyzer-core",
"description": "Core Package for the Salesforce Code Analyzer",
"version": "0.39.0",
"version": "0.40.0-SNAPSHOT",
"author": "The Salesforce Code Analyzer Team",
"license": "BSD-3-Clause",
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
Expand Down Expand Up @@ -72,4 +72,4 @@
"!src/index.ts"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
toJsonResultsOutput
} from "./json-run-results-format";

const HTML_TEMPLATE_VERSION: string = '0.0.13';
const HTML_TEMPLATE_VERSION: string = '0.0.14';
const HTML_TEMPLATE_FILE: string = path.resolve(__dirname, '..', '..', '..', 'output-templates', `html-template-${HTML_TEMPLATE_VERSION}.txt`);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@
);
}
getLocation(violation) {
const position = this.getPosition(violation);
return `<ul class="locations"><li><span class="file">${position ? `${violation.file} (${position})` : violation.file}</span></li></ul>`;
var _a, _b;
const position = this.getPosition(violation),
location = position
? `${violation.file} (${position})`
: violation.file,
comment =
(_b = (_a = violation.locations) == null ? void 0 : _a[0]) == null
? void 0
: _b.comment;
return `<ul class="locations"><li><span class="file">${location}</span>${comment ? `<span class="comment">${comment}</span>` : ""}</li></ul>`;
}
getLocationsList(violation) {
var _a;
Expand Down Expand Up @@ -1793,7 +1801,7 @@ <h4 aria-hidden="true">Group</h4>
Generated by Code Analyzer from path:

<!-- START OF RUNDIR -->
<span class="rundir">{{###RUNDIR###}}</span>
<code class="rundir">{{###RUNDIR###}}</code>
<!-- END OF RUNDIR -->

</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@
);
}
getLocation(violation) {
const position = this.getPosition(violation);
return `<ul class="locations"><li><span class="file">${position ? `${violation.file} (${position})` : violation.file}</span></li></ul>`;
var _a, _b;
const position = this.getPosition(violation),
location = position
? `${violation.file} (${position})`
: violation.file,
comment =
(_b = (_a = violation.locations) == null ? void 0 : _a[0]) == null
? void 0
: _b.comment;
return `<ul class="locations"><li><span class="file">${location}</span>${comment ? `<span class="comment">${comment}</span>` : ""}</li></ul>`;
}
getLocationsList(violation) {
var _a;
Expand Down Expand Up @@ -1793,7 +1801,7 @@ <h4 aria-hidden="true">Group</h4>
Generated by Code Analyzer from path:

<!-- START OF RUNDIR -->
<span class="rundir">{{###RUNDIR###}}</span>
<code class="rundir">{{###RUNDIR###}}</code>
<!-- END OF RUNDIR -->

</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,16 @@
);
}
getLocation(violation) {
const position = this.getPosition(violation);
return `<ul class="locations"><li><span class="file">${position ? `${violation.file} (${position})` : violation.file}</span></li></ul>`;
var _a, _b;
const position = this.getPosition(violation),
location = position
? `${violation.file} (${position})`
: violation.file,
comment =
(_b = (_a = violation.locations) == null ? void 0 : _a[0]) == null
? void 0
: _b.comment;
return `<ul class="locations"><li><span class="file">${location}</span>${comment ? `<span class="comment">${comment}</span>` : ""}</li></ul>`;
}
getLocationsList(violation) {
var _a;
Expand Down Expand Up @@ -1793,7 +1801,7 @@ <h4 aria-hidden="true">Group</h4>
Generated by Code Analyzer from path:

<!-- START OF RUNDIR -->
<span class="rundir">{{###RUNDIR###}}</span>
<code class="rundir">{{###RUNDIR###}}</code>
<!-- END OF RUNDIR -->

</p>
Expand Down