Giter Site home page Giter Site logo

Comments (10)

wgliang avatar wgliang commented on May 18, 2024

Because it is necessary to build a project dependent tree.If the default path is not found, check the vendor path.

from goreporter.

JulienTant avatar JulienTant commented on May 18, 2024

I have the exact same issue. I have a project with a lot of "subpackages", and it looks like it cannot find them

from goreporter.

wgliang avatar wgliang commented on May 18, 2024

@JulienTant What is the structure of your catalog?

from goreporter.

JulienTant avatar JulienTant commented on May 18, 2024

it looks like

root
  |- package1
	|- package1-1
	|- package1-2
  |- package2
	|- package2-1
	|- package2-2
	|- package2-3
  |- package3
	|- package3-1
	|- package3-1

where "root" is located in $GOPATH/src/root.

So I cd $GOPATH/src/root and I run goreporter -p . -r /tmp/report -f html, then i got errors like

can't load package "package1/package1-1": cannot find package "package1/package1-1" in any of:
        /usr/local/Cellar/go/1.8.3/libexec/src/package1/package1-1 (from $GOROOT)
        /Users/a/go/src/package1/package1-1 (from $GOPATH)

What is strange is that root is missing into the package name, I mean in code I import root/package1/package1-1, never just package1/package1-1.

I hope my explanations are clear enough ^^

from goreporter.

wgliang avatar wgliang commented on May 18, 2024

I'm sorry,I got it. But I think you should run it like: goreporter -p ../root -r /tmp/report -f html.
You need to specify the relative path of your project and include the name root of your project.
This restriction is to avoid some ambiguity.
Hope to solve your problem.

from goreporter.

asheet-bhaskar avatar asheet-bhaskar commented on May 18, 2024

@wgliang
I am running following command from project directory to generate the report
goreporter -p ../go_surge_app -e "vendor " -f html
But the problem is it includes packages in vendor directory and because of this average coverage % goes down. And if i generate report by deleting vendor directory, average coverage becomes % becomes zero and no GodeGraph.

from goreporter.

wgliang avatar wgliang commented on May 18, 2024

I've added the vendor to the default exception keyword,due to a lot of feedback on the problem.
You can pull latest code and have a try. @asheet-kumar

from goreporter.

asheet-bhaskar avatar asheet-bhaskar commented on May 18, 2024

Thanks @wgliang. it works now.

from goreporter.

JulienTant avatar JulienTant commented on May 18, 2024

Thanks @wgliang

from goreporter.

wgliang avatar wgliang commented on May 18, 2024

At your call. @asheet-kumar @JulienTant

from goreporter.

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.