diff --git a/lib/analyze.js b/lib/analyze.js index 354ca86b0c..775ecd69f1 100644 --- a/lib/analyze.js +++ b/lib/analyze.js @@ -243,6 +243,12 @@ async function getFileDiffsWithBasehead(baseRef, headLabel, logger) { } } function getDiffRanges(fileDiff, logger) { + // Diff-informed queries expect the file path to be absolute. CodeQL always + // uses forward slashes as the path separator, so on Windows we need to + // replace any backslashes with forward slashes. + const filename = path + .join(actionsUtil.getRequiredInput("checkout_path"), fileDiff.filename) + .replaceAll(path.sep, "/"); if (fileDiff.patch === undefined) { if (fileDiff.changes === 0) { // There are situations where a changed file legitimately has no diff. @@ -253,17 +259,16 @@ function getDiffRanges(fileDiff, logger) { return []; } // If a file is reported to have nonzero changes but no patch, that may be - // due to the file diff being too large. In this case, we should return - // undefined to indicate that we cannot process the diff. - logger.warning(`No patch found for file ${fileDiff.filename} with ${fileDiff.changes} changes.`); - return undefined; + // due to the file diff being too large. In this case, we should fall back + // to a special diff range that covers the entire file. + return [ + { + path: filename, + startLine: 0, + endLine: 0, + }, + ]; } - // Diff-informed queries expect the file path to be absolute. CodeQL always - // uses forward slashes as the path separator, so on Windows we need to - // replace any backslashes with forward slashes. - const filename = path - .join(actionsUtil.getRequiredInput("checkout_path"), fileDiff.filename) - .replaceAll(path.sep, "/"); // The 1-based file line number of the current line let currentLine = 0; // The 1-based file line number that starts the current range of added lines diff --git a/lib/analyze.js.map b/lib/analyze.js.map index 8b44a56c3a..d61f50f2e8 100644 --- a/lib/analyze.js.map +++ b/lib/analyze.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwIA,sCAmCC;AAcD,sCAiBC;AAkDD,8DAgCC;AAgQD,gCA0IC;AAED,kCA8BC;AAED,gEA2CC;AAED,gCAYC;AAjwBD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAAyC;AAEzC,gDAAkC;AAClC,8CAAs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CAAC;AACpB,CAAC;AAEY,QAAA,kBAAkB,GAAG;IAChC,aAAa;CACd,CAAC"} \ No newline at end of file +{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwIA,sCAmCC;AAcD,sCAiBC;AAkDD,8DAgCC;AAmQD,gCA0IC;AAED,kCA8BC;AAED,gEA2CC;AAED,gCAYC;AApwBD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAAyC;AAEzC,gDAAkC;AAClC,8CAAsB;AACtB,8CAAgC;AAEhC,4DAA8C;AAC9C,6CAA4C;AAC5C,2CAAgD;AAChD,qCAA6C;AAE7C,+CAA8D;AAC9D,+CAAuC;AACvC,mDAA6D;AAC7D,2CAA0D;AAC1D,uCAAmD;AAEnD,qDAAgD;AAChD,mDAAuD;AACvD,6CAAuD;AACvD,6CAA+B;AAC/B,iCAAmC;AAEnC,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YACS,mBAAwC,EACxC,OAAe,EACf,KAAY;QAEnB,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,YAAO,GAAP,OAAO,CAAQ;QACf,UAAK,GAAL,KAAK,CAAO;QAGnB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AATD,kDASC;AAwFD,KAAK,UAAU,oBAAoB,CAAC,MAAc;IAChD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAClD,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5D,+FAA+F;QAC/F,OAAO;IACT,CAAC;IAED,MAAM,CAAC,OAAO,CACZ,iSAAiS;QAC/R,mPAAmP,CACtP,CAAC;IACF,OAAO;AACT,CAAC;AAEM,KAAK,UAAU,aAAa,CACjC,MAAc,EACd,MAA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AAC,CAAC;IAC3C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClE,MAAM,MAAM,CAAC,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAEY,QAAA,kBAAkB,GAAG;IAChC,aAAa;CACd,CAAC"} \ No newline at end of file diff --git a/lib/analyze.test.js b/lib/analyze.test.js index a74de5c969..ddaf8cfaca 100644 --- a/lib/analyze.test.js +++ b/lib/analyze.test.js @@ -146,7 +146,13 @@ function runGetDiffRanges(changes, patch) { }); (0, ava_1.default)("getDiffRanges: file diff too large", async (t) => { const diffRanges = runGetDiffRanges(1000000, undefined); - t.deepEqual(diffRanges, undefined); + t.deepEqual(diffRanges, [ + { + path: "/checkout/path/test.txt", + startLine: 0, + endLine: 0, + }, + ]); }); (0, ava_1.default)("getDiffRanges: diff thunk with single addition range", async (t) => { const diffRanges = runGetDiffRanges(2, [ @@ -303,4 +309,8 @@ function runGetDiffRanges(changes, patch) { }, ]); }); +(0, ava_1.default)("getDiffRanges: malformed thunk header", async (t) => { + const diffRanges = runGetDiffRanges(2, ["@@ 30 +50,2 @@", "+1", "+2"]); + t.deepEqual(diffRanges, undefined); +}); //# sourceMappingURL=analyze.test.js.map \ No newline at end of file diff --git a/lib/analyze.test.js.map b/lib/analyze.test.js.map index 1694ac52ff..1aa1a1b6df 100644 --- a/lib/analyze.test.js.map +++ b/lib/analyze.test.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze.test.js","sourceRoot":"","sources":["../src/analyze.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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E;IACxD,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src/analyze.test.ts b/src/analyze.test.ts index 39b9f6ae05..20cde745b3 100644 --- a/src/analyze.test.ts +++ b/src/analyze.test.ts @@ -144,7 +144,13 @@ test("getDiffRanges: file unchanged", async (t) => { test("getDiffRanges: file diff too large", async (t) => { const diffRanges = runGetDiffRanges(1000000, undefined); - t.deepEqual(diffRanges, undefined); + t.deepEqual(diffRanges, [ + { + path: "/checkout/path/test.txt", + startLine: 0, + endLine: 0, + }, + ]); }); test("getDiffRanges: diff thunk with single addition range", async (t) => { @@ -308,3 +314,8 @@ test("getDiffRanges: no diff context lines", async (t) => { }, ]); }); + +test("getDiffRanges: malformed thunk header", async (t) => { + const diffRanges = runGetDiffRanges(2, ["@@ 30 +50,2 @@", "+1", "+2"]); + t.deepEqual(diffRanges, undefined); +}); diff --git a/src/analyze.ts b/src/analyze.ts index 91a706e06e..d21418d42c 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -387,6 +387,13 @@ function getDiffRanges( fileDiff: FileDiff, logger: Logger, ): DiffThunkRange[] | undefined { + // Diff-informed queries expect the file path to be absolute. CodeQL always + // uses forward slashes as the path separator, so on Windows we need to + // replace any backslashes with forward slashes. + const filename = path + .join(actionsUtil.getRequiredInput("checkout_path"), fileDiff.filename) + .replaceAll(path.sep, "/"); + if (fileDiff.patch === undefined) { if (fileDiff.changes === 0) { // There are situations where a changed file legitimately has no diff. @@ -397,21 +404,17 @@ function getDiffRanges( return []; } // If a file is reported to have nonzero changes but no patch, that may be - // due to the file diff being too large. In this case, we should return - // undefined to indicate that we cannot process the diff. - logger.warning( - `No patch found for file ${fileDiff.filename} with ${fileDiff.changes} changes.`, - ); - return undefined; + // due to the file diff being too large. In this case, we should fall back + // to a special diff range that covers the entire file. + return [ + { + path: filename, + startLine: 0, + endLine: 0, + }, + ]; } - // Diff-informed queries expect the file path to be absolute. CodeQL always - // uses forward slashes as the path separator, so on Windows we need to - // replace any backslashes with forward slashes. - const filename = path - .join(actionsUtil.getRequiredInput("checkout_path"), fileDiff.filename) - .replaceAll(path.sep, "/"); - // The 1-based file line number of the current line let currentLine = 0; // The 1-based file line number that starts the current range of added lines