Skip to content

Cannot determine the number of lines in C# repository #584

Closed

Description

@Skyluker4

I'm having an issue when running code QL on my C# code with GitHub Actions. It analyzes the code fine, but it says in the logs that it can't count the total number of lines. It's not really affecting anything, but it suggested to drop an issue here.

Here's the relevant part of the log when running the action:

Running queries for csharp
  /opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/codeql database run-queries --ram=5929 --threads=2 /home/runner/work/_temp/codeql_databases/csharp --min-disk-free=1024 -v /home/runner/work/_temp/codeql_databases/csharp-queries-builtin.qls
  Could not determine the total number of lines of code in this repository. Because of this, it will not be possible to 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 produced by code scanning. 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, or otherwise information about the code scanning workflow you are using.

And here's the link to one of the runs with the error: https://github.com/Skyluker4/UnityAssetReplacer/runs/2890183826

Activity

  1. edoardopirovano commented on Jun 23, 2021

    @edoardopirovano
    Contributor

    Many thanks for reaching out to us with this warning! As the log message says, the lines of code counting is for informational purposes only and will not affect the CodeQL analysis of your repository. It's quite a new feature, so we're still ironing out some small issues with it. Indeed, it seems to not be correctly finding lines of code in C# files with the extension .cs because these are being incorrectly classified as Smalltalk for some reason!

    I'll try to get to the bottom of what is going on for you and hopefully we can have our line counting working correctly on your repository (and other C# ones!) in not too long.

  2. edoardopirovano commented on Jun 24, 2021

    @edoardopirovano
    Contributor

    Thank you once again for reporting this! It should be fixed in our next release which should happen in the next a week or two :)

  3. Skyluker4 commented on Jun 24, 2021

    @Skyluker4
    Author

    It works! I ran it from the main branch and there are no more errors.

  4. edoardopirovano commented on Jun 24, 2021

    @edoardopirovano
    Contributor

    That's great, thanks for trying it out from main!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions