mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Fix inconsistent quoting in diffRangeExtensionPackContents and empty initial line
This commit is contained in:
5
lib/entry-points.js
generated
5
lib/entry-points.js
generated
@@ -185926,8 +185926,7 @@ async function setupDiffInformedQueryRun(logger2, checkoutPath) {
|
||||
);
|
||||
}
|
||||
function diffRangeExtensionPackContents(ranges, checkoutPath) {
|
||||
const header = `
|
||||
extensions:
|
||||
const header = `extensions:
|
||||
- addsTo:
|
||||
pack: codeql/util
|
||||
extensible: restrictAlertsTo
|
||||
@@ -185936,7 +185935,7 @@ extensions:
|
||||
`;
|
||||
let data = ranges.map((range2) => {
|
||||
const filename = path16.join(checkoutPath, range2.path).replaceAll(path16.sep, "/");
|
||||
return ` - [${dump(filename, { forceQuotes: true, quoteStyle: "single" }).trim()}, ${range2.startLine}, ${range2.endLine}]
|
||||
return ` - [${dump(filename, { forceQuotes: true, quoteStyle: "double" }).trim()}, ${range2.startLine}, ${range2.endLine}]
|
||||
`;
|
||||
}).join("");
|
||||
if (!data) {
|
||||
|
||||
@@ -319,8 +319,7 @@ export function diffRangeExtensionPackContents(
|
||||
ranges: DiffThunkRange[],
|
||||
checkoutPath: string,
|
||||
): string {
|
||||
const header = `
|
||||
extensions:
|
||||
const header = `extensions:
|
||||
- addsTo:
|
||||
pack: codeql/util
|
||||
extensible: restrictAlertsTo
|
||||
@@ -341,7 +340,7 @@ extensions:
|
||||
// characters are escaped, and that the path is always rendered as a
|
||||
// quoted string on a single line.
|
||||
return (
|
||||
` - [${yaml.dump(filename, { forceQuotes: true, quoteStyle: "single" }).trim()}, ` +
|
||||
` - [${yaml.dump(filename, { forceQuotes: true, quoteStyle: "double" }).trim()}, ` +
|
||||
`${range.startLine}, ${range.endLine}]\n`
|
||||
);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user