microsoft / microsoft/component-detection

component detection support regex to match files.

Open
#74 2 comments 1 reaction 0 assignees View on GitHub
detector:pip status:waiting-on-response type:bug
Dominant language
C#
Stars
553
Forks
135
Avg merge
20h 58m
Merged PRs (30d)
6

Description

Hi component detection team,
Our public repo: [azure-cli](https://github.com/Azure/azure-cli) is using component detection in Azure DevOps pipelines.
in our repo, we have multiple reuqirment.$PYVERSION.$PLATFORM.txt file.
For example:
https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.Darwin.txt
https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.Linux.txt
https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/requirements.py3.windows.txt

But component detection task only match requirements.txt file
[component-detection.log](https://github.com/microsoft/component-detection/files/8174117/component-detection.log)

Can you support `regex` while checking files.
Currently:
https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/pip/PipComponentDetector.cs#L18
![image](https://user-images.githubusercontent.com/18628534/156481332-e8c5728e-4afe-40aa-85cf-8c1157660493.png)
Suggetsion:
public override IList SearchPatterns => new List { "setup*.py", "requirements*.txt" };

Thanks.

Contributor guide

Open the contributing guide

Research direction

Start in src/Microsoft.ComponentDetection.Detectors/pip/PipComponentDetector.cs, especially the SearchPatterns definition, and review the linked component-detection.log. Check detection against the Azure CLI files requirements.py3.Darwin.txt, requirements.py3.Linux.txt, and requirements.py3.windows.txt; done means these files are matched in addition to requirements.txt.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.