• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sds / overcommit / 1490 / 5
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 09 Jan 2018 05:58PM UTC
Files 170
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jan 2018 05:56PM UTC coverage: 89.555% (-0.03%) from 89.582%
2.4.1

push

travis-ci

trotzig
Run `golint` for each file that has changed (#530)

* Run `golint` for each file that has changed

If I change one file `main.go`, then the `GoLint` hook runs `golint main.go` which is desirable and correct.

However, when I change files that belong to multiple packages such as:

1. `main.go`
2. `lib/util.go`

then the `GoLint` hook runs `golint main.go lib/util.go` which will always return the error (regardless of the presence of any lint errors)

> lib/util.go is in package lib, not main

This is because `golint` can only be used in the following way (from `golint --help`:

> Usage of golint:
> 	golint [flags] # runs on package in current directory
> 	golint [flags] [packages]
> 	golint [flags] [directories] # where a '/...' suffix includes all sub-directories
> 	golint [flags] [files] # all must belong to a single package

This means `golint` shouldn't be passed files that belong to different packages. 

This commit fixes this behaviour by running `golint` separately on each file that has changed. And the concatenating all their outputs.

* Remove trailing space and redundant variables

2658 of 2968 relevant lines covered (89.56%)

97.37 hits per line

Source Files on job 1490.5 (2.4.1)
  • Tree
  • List 0
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1490
  • Travis Job 1490.5
  • 7b8b4e13 on github
  • Prev Job for 2.4.1 on master (#1480.5)
  • Next Job for 2.4.1 on master (#1492.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc