Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

make lint should fail CI #27

Closed
clburlison opened this issue Jan 15, 2018 · 0 comments
Closed

make lint should fail CI #27

clburlison opened this issue Jan 15, 2018 · 0 comments
Assignees
Milestone

Comments

@clburlison
Copy link
Owner

When the lint tasks (specifically the golint command) fails we should exit 1. The only gotcha with this is the failure needs to allow the task to run first then check and fail. This way users can get the full golint output.

#!/bin/bash -eo pipefail
make lint
vendor/github.com/groob/mackit/example/password.go:24:2: comment not terminated
vendor/github.com/groob/mackit/example/password.go:38:3: expected '}', found 'EOF'
All .go files formatted correctly
/go/src/github.com/clburlison/bakeit/src/setup_linux.go:9:1: exported function Setup should have comment or be unexported
/go/src/github.com/clburlison/bakeit/src/chef/client.go:1:1: package comment should be of the form "Package chef ..."
/go/src/github.com/clburlison/bakeit/src/config/config.go:66:2: exported var ChefClientLogLevel should have comment or be unexported
/go/src/github.com/clburlison/bakeit/src/config/config.go:68:2: comment on exported var ChefClientSSLVerifyMode should be of the form "ChefClientSSLVerifyMode ..."
/go/src/github.com/clburlison/bakeit/src/node/node.go:4:6: type name will be used as node.NodeInfoObject by other packages, and that stutters; consider calling this InfoObject
/go/src/github.com/clburlison/bakeit/src/serial/serial_linux.go:3:1: exported function GetSerialNumber should have comment or be unexported

See https://circleci.com/gh/clburlison/bakeit/37

@clburlison clburlison added this to the 1.0 milestone Jan 15, 2018
@clburlison clburlison self-assigned this Jan 15, 2018
clburlison added a commit that referenced this issue Feb 24, 2018
* test: Lint will now fail CI

Thanks to Victor for the set_exit_status tip.

Fix: #27

* style: Remove dup FirstRunLogFile config key

* style: Fix lint issues with client.go

* style: Fix lint issues with config.go

* style: Fix lint issues with node package

* style: Fix lint issues with Linux/Windows

* style: Update flight.go to not have double if
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant