diff --git a/lib/count-loc.js b/lib/count-loc.js index 6bd2e17730..49bb48aeca 100644 --- a/lib/count-loc.js +++ b/lib/count-loc.js @@ -54,7 +54,14 @@ async function countLoc(cwd, include, exclude, dbLanguages, logger) { } } else { - logger.warning("Did not find any lines of code in database."); + logger.warning("Could not determine the number of lines of code for this repository. " + + "Because of this, it will not be possible compare the number of lines " + + "of code analyzed by code scanning with the total number of lines of " + + "code in the repository. This will not affect the results of the code " + + "scan. If you have any questions, you can raise an issue at " + + "https://github.com/github/codeql-action/issues. Please include a link " + + "to the repository if public, otherwise information code scanning " + + "workflow you are using."); } return lineCounts; } diff --git a/lib/count-loc.js.map b/lib/count-loc.js.map index 420893dde4..dbf570ae53 100644 --- a/lib/count-loc.js.map +++ b/lib/count-loc.js.map @@ -1 +1 @@ -{"version":3,"file":"count-loc.js","sourceRoot":"","sources":["../src/count-loc.ts"],"names":[],"mappings":";;AAAA,qDAAyC;AAIzC,4EAA4E;AAC5E,MAAM,kBAAkB,GAAG;IACzB,CAAC,EAAE,KAAK;IACR,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAC1E,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACf,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACjB;IACD,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,OAAO,GAAG,CAAC;AACb,CAAC,EACD,EAAE,CACH,CAAC;AAEF;;;;;;;;;GASG;A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CAAC;KAC/D;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAxCD,4BAwCC"} \ No newline at end of file +{"version":3,"file":"count-loc.js","sourceRoot":"","sources":["../src/count-loc.ts"],"names":[],"mappings":";;AAAA,qDAAyC;AAIzC,4EAA4E;AAC5E,MAAM,kBAAkB,GAAG;IACzB,CAAC,EAAE,KAAK;IACR,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAC1E,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACf,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACjB;IACD,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,OAAO,GAAG,CAAC;AACb,CAAC,EACD,EAAE,CACH,CAAC;AAEF;;;;;;;;;GASG;AACI,KAAK,UAAU,QAAQ,CAC5B,GAAW,EACX,OAAiB,EACjB,OAAiB,EACjB,WAAqB,EACrB,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,IAAI,wBAAM,CAAC;QAC9B,GAAG;QACH,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,OAAO;QACP,iBAAiB,EAAE,WAAW,CAAC,OAAO,CACpC,CAAC,IAAI,EAAE,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAC3C;KACF,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEd,uDAAuD;IACvD,uDAAuD;IACvD,2DAA2D;IAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CACxD,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAChD,IAAI,UAAU,IAAI,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YAClD,GAAG,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACjD;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAA4B,CAC7B,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE;QAClC,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACrC,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YAC1D,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,KAAK,KAAK,EAAE,CAAC,CAAC;SACzC;KACF;SAAM;QACL,MAAM,CAAC,OAAO,CACZ,uEAAuE;YACrE,uEAAuE;YACvE,sEAAsE;YACtE,uEAAuE;YACvE,6DAA6D;YAC7D,wEAAwE;YACxE,mEAAmE;YACnE,yBAAyB,CAC5B,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAjDD,4BAiDC"} \ No newline at end of file diff --git a/src/count-loc.ts b/src/count-loc.ts index 8a1de69f53..f7bd30e2b8 100644 --- a/src/count-loc.ts +++ b/src/count-loc.ts @@ -72,7 +72,16 @@ export async function countLoc( logger.debug(` ${language}: ${count}`); } } else { - logger.warning("Did not find any lines of code in database."); + logger.warning( + "Could not determine the number of lines of code for this repository. " + + "Because of this, it will not be possible compare the number of lines " + + "of code analyzed by code scanning with the total number of lines of " + + "code in the repository. This will not affect the results of the code " + + "scan. If you have any questions, you can raise an issue at " + + "https://github.com/github/codeql-action/issues. Please include a link " + + "to the repository if public, otherwise information code scanning " + + "workflow you are using." + ); } return lineCounts;