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

Allow index-files to specify file target list? #74

Open
Manouchehri opened this issue Jul 28, 2021 · 5 comments
Open

Allow index-files to specify file target list? #74

Manouchehri opened this issue Jul 28, 2021 · 5 comments
Labels

Comments

@Manouchehri
Copy link

Instead of manually specifying --include=src/file1.js, --include=src/file2.js, --include=src/file3.js, etc, hundred/thousands of times for large projects, it would be really handy if I could just provide the list of files I want indexed.

Usage would look like:

codeql database index-files --language=javascript --file-list=targets.txt my_database

And targets.txt would look like:

src/file1.js
src/file2.js
src/file3.js

(Obviously in a real world use-case, it would be a much longer list.)

Semi-related: #9.

@github-actions github-actions bot added the CLI label Jul 28, 2021
@adityasharad
Copy link
Contributor

Are you interested in indexing a fixed list of files, rather than using a glob pattern (which --include already supports)?

@Manouchehri
Copy link
Author

That's correct!

@aeisenberg
Copy link
Contributor

Could you do something like:

codeql database index-files --language=javascript --include=src/file1.js --include=src/file2.js --include=src/file3.js my_database

This wouldn't work for 100s of files, but might work for a handful.

@Manouchehri
Copy link
Author

That would work, but yeah, my use-case is in the >1,000 range of files. =)

@edoardopirovano
Copy link
Contributor

This might be something we want to support more directly, but I imagine you could achieve what you need with xargs in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants