Add a check for misspelled .python-version files
#1970
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We recommend that apps use a
.python-versionfile to specify their Python version. However, as seen on Honeycomb after #1904, a small number of apps in the wild have spelt the file incorrectly - and sometimes with names that look very similar to the correct name, so the mistake would be easy to miss.Some of the mistakes seen include:
.in the filename..txt.The metrics show that some apps have both a correctly spelled file and an incorrectly spelled one, which I suspect would lead to a confusing UX if the wrong file was ever updated ("why isn't Heroku using the Python version I've specified?") - particularly in the case where the user doesn't have dotfiles visible in eg Finder and the spelling mistake was omitting the leading
.. As such, we still error if a misspelled file is found, even if a correctly named one also exists.GUS-W-19687420.