Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Skyluker4 opened this issue Jun 23, 2021 · 4 comments · Fixed by #586
Closed

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

Skyluker4 opened this issue Jun 23, 2021 · 4 comments · Fixed by #586
Assignees

Comments

@Skyluker4
Copy link

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

@edoardopirovano
Copy link
Contributor

edoardopirovano commented Jun 23, 2021

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.

@edoardopirovano
Copy link
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 :)

@Skyluker4
Copy link
Author

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

@edoardopirovano
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants