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

fix: ignore pip install .whl file #140

Closed
wants to merge 0 commits into from

Conversation

OshriAsulin
Copy link
Contributor

I have added a condition for ignoring commands that contain a string .whl

the condition is returned null to indicate that the package should be ignored.

and I added this example to examples in this file 'real-examples.yaml'

@baruchiro baruchiro changed the title ignore from commands that contain a string .whl fix: ignore pip install .whl file Jul 25, 2023
@baruchiro baruchiro self-requested a review July 25, 2023 06:45
Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should run yarn test locally and check the changes in real-example-results.yaml, if they are the expected results and seems OK, add them to the Pull Request.

src/content/registry/python.js Outdated Show resolved Hide resolved
tests/real-examples/real-examples.yaml Outdated Show resolved Hide resolved
@OshriAsulin
Copy link
Contributor Author

I run tests and everything seems fine except for one error unrelated to the change I made
but no changes were made to the file 'real-example-results.yaml'

@baruchiro
Copy link
Collaborator

You should delete the tests/real-examples/snapshots folder and the re-run the tests (you may run yarn test:integration if you want to run only the "real examples" test)

yarn.lock Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not change.

@@ -90,6 +90,11 @@ const handleArgument = (argument, restCommandWords) => {

const baseCommandMatch = (line) => line.match(/pip3? +install/);
const packageWordParse = (word) => {
if (word.includes('.whl')) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (word.includes('.whl')) {
if (word.endsWith('.whl')) {

github-merge-queue bot pushed a commit that referenced this pull request Jul 30, 2023
Continue of #140 
Close #119 

I added a change for ignore commands that end with `.whl`,
and I also added an example to real-examples.yaml

---------

Co-authored-by: Baruch Odem <baruch.odem@checkmarx.com>
Co-authored-by: Baruch Odem (Rothkoff) <baruchiro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants