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

Add multiple Python packages post-linter #764

Merged
merged 10 commits into from
Oct 24, 2023

Conversation

Elizafox
Copy link
Contributor

Take two after resolving git issues.

This implements a lint checking if a package contains multiple Python packages.

It's rather simplistic at the moment but I think this should get the job done.

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

@Elizafox Elizafox force-pushed the python-multiple-postlint branch from f9bcbb7 to 2f4374d Compare October 18, 2023 00:31
@Elizafox Elizafox force-pushed the python-multiple-postlint branch from 30c5833 to 4e3cd34 Compare October 18, 2023 00:59
This will be caught by a different linter later

Signed-off-by: Elizabeth Myers <[email protected]>
This will be caught by another linter later.

Signed-off-by: Elizabeth Myers <[email protected]>
@Elizafox Elizafox changed the title Add multiple Python packages post-linter [DRAFT] Add multiple Python packages post-linter Oct 18, 2023
Signed-off-by: Elizabeth Myers <[email protected]>
@imjasonh
Copy link
Member

The change itself looks good. Do we have data about how many existing latest packages might get tripped up by this?

@Elizafox
Copy link
Contributor Author

The change itself looks good. Do we have data about how many existing latest packages might get tripped up by this?

Doing a run on all py3 packages, will report back when it's done.

@Elizafox
Copy link
Contributor Author

Elizafox commented Oct 24, 2023

Here are the failures I collected from our built APK's: https://gist.github.com/Elizafox/8046fd4a06e8cfd309ee9dac84ebe11d

Some of those are false positives, like _foo packages. I might disregard them. Others the linter should be disabled on.

This will probably remain a warning-only linter for the forseeable future.

These are generally internal packages in Python and should be ignored as
duplicates.

Signed-off-by: Elizabeth Myers <[email protected]>
Strip off the extension and add them to a map, to filter them as
duplicates.

Signed-off-by: Elizabeth Myers <[email protected]>
Signed-off-by: Elizabeth Myers <[email protected]>
@Elizafox Elizafox changed the title [DRAFT] Add multiple Python packages post-linter Add multiple Python packages post-linter Oct 24, 2023
@imjasonh
Copy link
Member

That gist is really helpful!! Thanks for adding this, let's get it into use.

@imjasonh imjasonh merged commit ff67860 into chainguard-dev:main Oct 24, 2023
26 checks passed
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

Successfully merging this pull request may close these issues.

2 participants