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

Warn if manifest has lines that don't do anything #33

Open
cjerdonek opened this issue Oct 1, 2014 · 10 comments
Open

Warn if manifest has lines that don't do anything #33

cjerdonek opened this issue Oct 1, 2014 · 10 comments

Comments

@cjerdonek
Copy link

It would be nice if check-manifest also warned you if MANIFEST.in has lines that "don't do anything" (i.e. lines that match no files being included). The presence of such lines means that MANIFEST.in can be simplified, or perhaps that files are missing from source control that should be there.

@mgedmin
Copy link
Owner

mgedmin commented Oct 1, 2014

I'd accept such a pull request. I'm unlikely to find time to work on this myself.

@cjerdonek
Copy link
Author

It looks like one prerequisite to doing this is enhancing _get_ignore_from_manifest() to return the include lines and not just the exclude lines. Once that is in place, it should be straightforward.

The suggestions in this feature request can note not just unneeded includes but also unneeded excludes.

@mgedmin
Copy link
Owner

mgedmin commented Oct 1, 2014

Unneeded excludes tend to produce warnings during pip install time, so warning about them seems like a good idea.

I'm waiting for the pull request :)

@cjerdonek
Copy link
Author

I started working on it to see how much time it would take. :)

I will see if I have some time later this week, but not today.

@mgedmin
Copy link
Owner

mgedmin commented Dec 23, 2014

This is complicated by the fact that a line like prune docs/_build might appear not to be doing anything if you don't have a docs/_build directory at the moment (like after a clean checkout), but it will be doing something important if you happen to run make -C docs html and build your Sphinx documentation.

@cjerdonek
Copy link
Author

That seems acceptable to me given that the proposal is for a warning rather than an error. For example, if there is a warning that docs/_build doesn't exist, I think the user could surmise that the documents haven't been built.

@mgedmin
Copy link
Owner

mgedmin commented Dec 23, 2014

BTW I would be very interested in seeing concrete examples of situations where you missed such warnings!

@cjerdonek
Copy link
Author

I'll let you know if I encounter any in the future. It's been a while since I filed this, so I can't remember the particular files unfortunately.

@tjanez
Copy link
Contributor

tjanez commented Oct 27, 2016

I have a concrete example.

Upon refactoring linters' configuration for the Resolwe project, the .pep8rc file was deleted, however, it remained in the MANIFEST.in file as include .pep8rc .pylintrc tox.ini on line 9.

As mentioned in this issue report, this remained uncaught by the check-manifest tool so it remained unnoticed until a developer spotted it and removed it.

@mgedmin
Copy link
Owner

mgedmin commented Oct 27, 2016

Thank you, that is a useful example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants