Giter Club home page Giter Club logo

Comments (14)

dknebula avatar dknebula commented on July 22, 2024 1

@Bachmann1234 @sunmoondeer thanks for your help.

There are several modules in my project.

.
├── module1
│   ├── pom.xml
│   └── src
│       └── main
│           └── java
├── module2
│   ├── pom.xml
│   └── src
│       └── main
│           └── java
├── pom.xml

Although I can not get the whole diff info directly, I can get the module diff in the project.

diff-cover coverage.xml

Diff Coverage
Diff: origin/master...HEAD, staged and unstaged changes
No lines with coverage information in this diff.

diff-cover coverage.xml --src-roots module1/src/main/java

...
Total: 188 lines
Missing: 107 lines
Coverage: 43%

from diff_cover.

sunmoondeer avatar sunmoondeer commented on July 22, 2024

Can you get the diff info when you run git diff origin/develop...HEAD?

from diff_cover.

dknebula avatar dknebula commented on July 22, 2024

Can you get the diff info when you run git diff origin/develop...HEAD?

I can get the diff info when run the command.

git diff origin/develop...HEAD

...
@@ -265,15 +265,30 @@
...

from diff_cover.

sunmoondeer avatar sunmoondeer commented on July 22, 2024

This tool just work on linux env right now, if you are using windows then change to linux

from diff_cover.

Bachmann1234 avatar Bachmann1234 commented on July 22, 2024

im surprised to hear that. I have run the test suite in a windows environment in the past and it seemed to work. At some point I need to look into #103 and see if that shakes out any issues

from diff_cover.

Bachmann1234 avatar Bachmann1234 commented on July 22, 2024

#111 may help solve this. Im going to put out a release asap with it

from diff_cover.

Bachmann1234 avatar Bachmann1234 commented on July 22, 2024

Please try out https://pypi.org/project/diff-cover/2.1.0/

from diff_cover.

keyescgm avatar keyescgm commented on July 22, 2024

Please try out https://pypi.org/project/diff-cover/2.1.0/

How to view the diff-cover‘s version?

from diff_cover.

keyescgm avatar keyescgm commented on July 22, 2024

hello,you see,my project Integrated jacoco plugin

image

use the following command, prompt "No lines with coverage information in this diff."

image

from diff_cover.

Bachmann1234 avatar Bachmann1234 commented on July 22, 2024

i'm embarrassed to say diff-cover does not have a --version

I will make a note to add that.

If you installed the package via pip you can run pip freeze to see what you have installed.

Looking at your screenshots I think you may be having a similar issue to #114

Since you are on windows I would suggest making sure you are up to date.

In addition, look at the --src-roots command line switch

from diff_cover.

keyescgm avatar keyescgm commented on July 22, 2024

how to add the --src-roots?
image

from diff_cover.

Bachmann1234 avatar Bachmann1234 commented on July 22, 2024
  --src-roots DIRECTORY [DIRECTORY ...]
                        List of source directories (only for jacoco coverage
                        reports)

take your command and tell diff-cover the the location of your src directories

by default it assumes your code is in 'src/main/java' and 'src/test/java'

but it looks like you have a multi module build. So you need to add more. So you need to specify them.

So I think you need (in addition to your other options)

--src-roots "/module/<blanked out I cant tell>" --src-roots "/app/src/main/java" --src-roots "/src/test/java"

from diff_cover.

keyescgm avatar keyescgm commented on July 22, 2024

i'm embarrassed to say diff-cover does not have a --version

I will make a note to add that.

If you installed the package via pip you can run pip freeze to see what you have installed.

Looking at your screenshots I think you may be having a similar issue to #114

Since you are on windows I would suggest making sure you are up to date.

In addition, look at the --src-roots command line switch

image

from diff_cover.

keyescgm avatar keyescgm commented on July 22, 2024

how can i do?
always show the result:
No lines with coverage information in this diff.
headache··
I've tried all methods

from diff_cover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.