This repository was archived by the owner on Feb 19, 2020. It is now read-only.
Fix generate_filename#36
Merged
rtfpessoa merged 2 commits intoarchived-codacy:masterfrom Dec 20, 2017
IceflowRE:master
Merged
Conversation
|
LGTM 👍 |
and be sure that git_directory has linux seperator style too
Author
|
If git_directory is not available, subprocess gets not called everytime. |
rtfpessoa
approved these changes
Nov 15, 2017
Closed
Author
|
Could this be merged soon? It prevents successfull/correct uploads to codacy. |
|
Sorry for the delay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I discovered some issues with the generate_filename function.
Folder structure
Executing generate_filename:
Result:
Expected:
Reason:
reporter.py#L49
package/foo2.pycannot be found in the/home/iceflower/project/src/which is obvious.Then it will check the subfolder reporter.py#54.
But it will never found them because
package/foo2.pyas a filename does not exist.Fix
Use of os.path.isfile() instead of the own function.
Other bug: the strip_prefix does not support Windows
\and Linux/separators, but the git subprocess can (will ever?) return/style, while the coverage.xml can contain the Windows style. So the prefix cannot be stripped correctly.Fix
Replace Windows style seperator with Linux style seperators.