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

No way to exclude specific files #968

Open
chrisfarnham opened this issue Jun 8, 2022 · 3 comments
Open

No way to exclude specific files #968

chrisfarnham opened this issue Jun 8, 2022 · 3 comments

Comments

@chrisfarnham
Copy link

In our Python projects it is a common pattern to have two requirements files:

  1. requirements.txt to declare dependencies which get bundled with our code and installed in productive systems
  2. dev-requirements.txt to declare development and CI dependencies which are needed to build and test the code but are not required for productive runtime configurations.

We explicitly have these two files to separate tools such as sphinx and ansible which have licenses that allow development use but we do not want to link within our code or "distribute" with our products.

I can't find a way to have the FOSSA configuration ignore an individual file. If I specify paths.exclude: dev-requirements.txt in .fossa.yml or other mechanisms it is ignored. I believe these configs only work at a directory level.

At this time I'm forced to delete the dev-requirements.txt from the root directory before fossa analyze which is undesirable.

Can we allow excludes at a file level to support this use case?

I believe that having requirements files for each environment (dev,test,prod) is fairly common. Licensing implications is one reason why.

@skilly-lily
Copy link
Contributor

skilly-lily commented Jun 8, 2022

You are correct that the paths.exclude filter will not work for this, as it only filters at the directory level.

We have had a feature request in our backlog for turning the various *req*.txt files into subtargets, so that they can be used with targets.exclude or targets.only:

$ fossa list-targets
setuptools@path/to/project:requirements.txt
setuptools@path/to/project:dev-requirements.txt

$ fossa analyze --only-target 'setuptools@path/to/project:requirements.txt'

I will add a reference to this ticket internally on the tracking ticket for that feature request.

@ShengYanMei
Copy link

ShengYanMei commented Jun 24, 2022

agree with you @chrisfarnham , I really desperate looking for a way to exclude a specific file, instead of directory only.
And @scruffystuffs , I'd really hope fossa could support this feature just like the directories, I mean I could simply add another item in .fossa.yml.

@ghost

This comment was marked as outdated.

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

No branches or pull requests

3 participants