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

sds / overcommit / 1490
91%

Build:
DEFAULT BRANCH: master
Ran 09 Jan 2018 05:58PM UTC
Jobs 5
Files 170
Run time 46s
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

pending completion
1490

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%)

484.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1490.1 (2.0) 09 Jan 2018 05:59PM UTC 0
89.84
Travis Job 1490.1
2 1490.2 (2.1) 09 Jan 2018 05:59PM UTC 0
89.84
Travis Job 1490.2
3 1490.3 (2.2) 09 Jan 2018 05:58PM UTC 0
89.55
Travis Job 1490.3
4 1490.4 (2.3.0) 09 Jan 2018 05:59PM UTC 0
89.84
Travis Job 1490.4
5 1490.5 (2.4.1) 09 Jan 2018 05:58PM UTC 0
89.56
Travis Job 1490.5
Source Files on build 1490
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1490
  • 7b8b4e13 on github
  • Prev Build on master (#1480)
  • Next Build on master (#1492)
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