Coder Social home page Coder Social logo

godacov's People

Contributors

danstis avatar dsmontoya avatar fclaude avatar fossabot avatar jainpiyush19 avatar jameswarren avatar schrej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

godacov's Issues

panic: Invalid line format

Hi,
I just started using codacy for this project and I've encountered a panic. Travis reports the following:

panic: Invalid line format
goroutine 1 [running]:
github.com/schrej/godacov/cmd.run(0x958180, 0xc42012a180, 0x0, 0x6)
	/home/travis/gopath/src/github.com/schrej/godacov/cmd/root.go:81 +0x615
github.com/spf13/cobra.(*Command).execute(0x958180, 0xc4200a8010, 0x6, 0x6, 0x958180, 0xc4200a8010)
	/home/travis/gopath/src/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/spf13/cobra.(*Command).ExecuteC(0x958180, 0x6c7294, 0xc420136200, 0x95bd50)
	/home/travis/gopath/src/github.com/spf13/cobra/command.go:852 +0x30a
github.com/spf13/cobra.(*Command).Execute(0x958180, 0xc42007c058, 0x0)
	/home/travis/gopath/src/github.com/spf13/cobra/command.go:800 +0x2b
github.com/schrej/godacov/cmd.Execute()
	/home/travis/gopath/src/github.com/schrej/godacov/cmd/root.go:49 +0x2d
main.main()
	/home/travis/gopath/src/github.com/schrej/godacov/main.go:19 +0x20

Here is my coverage script:

#!/usr/bin/env bash

set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
    go test -coverprofile=profile.out -covermode=atomic $d
    if [ -f profile.out ]; then
        cat profile.out >> coverage.txt
        rm profile.out
    fi
done

This is my travis configuration:

sudo: required

language: go

go:
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - 1.10.x
  - tip

matrix:
  allow_failures:
    - go: tip

services:
  - docker

install:
  - go get github.com/Masterminds/glide
  - go get github.com/schrej/godacov

script:
  - glide install
  - ./configs/coverage.sh

after_success:
  - bash <(curl -s https://codecov.io/bash)
  - godacov -t $CODACY_PROJECT_TOKEN -r ./coverage.txt -c $TRAVIS_COMMIT

Failed to post: {"error":"not found"}

It looks like this is related to codacy/codacy-coverage-reporter#11

I was trying to upload a coverage file with the following command and got the error Failed to post: {"error":"not found"}. It looks like this is related to codacy/codacy-coverage-reporter#11.

godacov -t xxxx -r ./cover.out -c xxx

Any ideas?

It looks like this is related to the custom base url, for example the java client supports an environment variable called CODACY_API_BASE_URL that allows you to override the base url

go get produces errors

The said errors are here:

go get github.com/schrej/godacov                                                                                                                                     ✓  20:13:04
# github.com/spf13/cobra
../../spf13/cobra/command.go:457:12: fs.ShorthandLookup undefined (type *pflag.FlagSet has no field or method ShorthandLookup)
../../spf13/cobra/command.go:1314:10: c.lflags.SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)
../../spf13/cobra/command.go:1314:32: c.Flags().SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)
../../spf13/cobra/command.go:1492:18: c.parentsPflags.SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)

File names with `-` are trimmed

If the file name contains a - it is trimmed by the regex and wrong file name is used.
Example :
FileName= "abcd-pkg/a.go"
After parsing the filename used to report coverage will be pkg/a.go.

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.