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

Provide tools to analyze the files in a database. #13

Open
mvanotti opened this issue Jan 24, 2020 · 2 comments
Open

Provide tools to analyze the files in a database. #13

mvanotti opened this issue Jan 24, 2020 · 2 comments
Labels
CLI enhancement New feature or request

Comments

@mvanotti
Copy link

Recently, I tried to use CodeQL to analyze my project, and all the steps succeeded without any warnings. However, after running some queries I realized that it was missing most of the files.

As a user, it would be nice to be able to list the files that are included in the database with just a command.

After talking with @adityasharad , he suggested using a simple query that just lists all the files:

/**
 * @description "List all the files"
 * @id debug.listfiles
 * @kind problem
 * @name list-files
 * @tags maintanability
 * @problem.severity recommendation
 **/
import cpp

from File f
select f, "This file is in the repo"

It would be nice to have something like that built into the application.

@mvanotti
Copy link
Author

Note that having this query would be fine, but having a native tool to get this same information might be faster. Running this query on my project takes more than 10 minutes.

@p0
Copy link

p0 commented Jan 27, 2020

Does select any(File f).getAbsolutePath() give you the information you need quicker?

[Context: The query as written will trigger a (cached) computation of the toString representation of all program elements, which is a cost you do not need to pay for your use case.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants