Skip to content

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

Description

@Manouchehri

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.

Activity

  1. adityasharad commented on Jul 28, 2021

    @adityasharad
    Contributor

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

  2. Manouchehri commented on Jul 28, 2021

    @Manouchehri
    Author

    That's correct!

  3. aeisenberg commented on Jul 28, 2021

    @aeisenberg
    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.

  4. Manouchehri commented on Jul 28, 2021

    @Manouchehri
    Author

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

  5. edoardopirovano commented on Jul 28, 2021

    @edoardopirovano
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions