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 support for popular java tools #68

Merged
merged 10 commits into from Dec 13, 2017
Merged

Conversation

peterg79
Copy link
Contributor

@peterg79 peterg79 commented Dec 8, 2017

Implement support for clover code coverage and checkstyle

@coveralls
Copy link

coveralls commented Dec 8, 2017

Coverage Status

Coverage increased (+0.01%) to 99.116% when pulling 4f98f67 on peterg79:master into bb3fcab on Bachmann1234:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 99.116% when pulling 4f98f67 on peterg79:master into bb3fcab on Bachmann1234:master.

@Bachmann1234
Copy link
Owner

Neat! Ill review this in detail this weekend.

@coveralls
Copy link

coveralls commented Dec 8, 2017

Coverage Status

Coverage decreased (-0.05%) to 99.055% when pulling 00237b3 on peterg79:master into bb3fcab on Bachmann1234:master.

['java', '-jar', 'checkstyle-8.5-all.jar', '-c',
'/google_checks.xml']
)
self.command_to_check_install = ['java', '-cp', 'checkstyle-8.5-all.jar', 'com.puppycrawl.tools.checkstyle.Main', '-version']
Copy link
Owner

Choose a reason for hiding this comment

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

Is there any way to have this less dependent on this specific version of checkstyle?

@Bachmann1234
Copy link
Owner

I like it, Im willing to loop past the .05% drop in coverage.

Can you update the readme to inform people about this. Make sure to include the versions of the supported tools.

@coveralls
Copy link

coveralls commented Dec 11, 2017

Coverage Status

Coverage decreased (-0.01%) to 99.094% when pulling 3b7f0e5 on peterg79:master into bb3fcab on Bachmann1234:master.

@Bachmann1234
Copy link
Owner

Merging! I'll do a release sometime this week. Thanks!

@Bachmann1234 Bachmann1234 merged commit eee9239 into Bachmann1234:master Dec 13, 2017
@peterg79
Copy link
Contributor Author

Thank you, this is a great tool :)

@Bachmann1234
Copy link
Owner

thanks! Released https://pypi.python.org/pypi/diff_cover/1.0.1

"""
files = [file_tree
for file_tree in xml_document.findall(".//file")
if file_tree.get('path') == src_path

Choose a reason for hiding this comment

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

@Bachmann1234 @peterg79 Before the equality check, we probably need to sanitize the path to unix path. Something like this [1]. Due to this clover reports generated under windows are not working with "GIT BASH"

[1] https://github.com/Bachmann1234/diff-cover/blob/da45062f066e94e0a65a84310b812c54cc423be9/diff_cover/violationsreporters/violations_reporter.py#L67

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rishi05091989 Do you have some sample data I can use to test? I have no access to a windows computer these days.

Choose a reason for hiding this comment

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

@peterg79 Thanks for your reply. The file tag in clover report looks like this,

<file path="C:\Users\guides_rishi\rishi_guides\guides\bundles\ds-guide-core\src\main\java\com\guide\themes\model\BreakpointInfo.java" name="BreakpointInfo.java">

Also, is it possible to use the clover and cobertura XML together ? As of today, only one coverage report can be used at a time(mixed is not supported).

Copy link
Contributor Author

@peterg79 peterg79 Oct 30, 2018

Choose a reason for hiding this comment

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

is it possible to use the clover and cobertura XML together

yes, with the latest release: #87

need to sanitize the path to unix path

I'll take a look at it soon

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.

None yet

4 participants