codeql-cli-binaries
codeql-cli-binaries copied to clipboard
Allow index-files to specify file target list?
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.
Are you interested in indexing a fixed list of files, rather than using a glob pattern (which --include
already supports)?
That's correct!
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.
That would work, but yeah, my use-case is in the >1,000 range of files. =)
This might be something we want to support more directly, but I imagine you could achieve what you need with xargs
in the meantime.