dependabot / dependabot/dependabot-core
Support long options when parsing pip requirements files
- Dominant language
- Ruby
- Stars
- 5.8k
- Forks
- 1.5k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 149
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Feature description
The current regexp patterns used to look for child requirements and constraints files in pip requirements files only support the `-r` and `-c` options:
https://github.com/dependabot/dependabot-core/blob/1a2e0cd4312cc4262644b7ef4afc6c8bd4e09519/python/lib/dependabot/python/shared_file_fetcher.rb#L24-L25
However, per the [pip requirements file format reference](https://pip.pypa.io/en/stable/reference/requirements-file-format/#global-options) there is support for using the long versions of these options, `--requirement` and `--constraint` respectively. It would be nice to support the long versions since some developers prefer to use them to self-document what is being done.
Contributor guide
Research direction
Start in python/lib/dependabot/python/shared_file_fetcher.rb at the regexp patterns around lines 24-25, then compare them with pip's requirements-file format reference. Confirm that child requirements and constraint files using the long options are recognized, and verify the existing parsing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, ruby
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100