Skip to content

Commit

Permalink
replace gometalinter with golangci-lint (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
akupila authored Mar 1, 2019
1 parent 96573d0 commit 2664dd3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
13 changes: 6 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ jobs:
steps:
- checkout
- run:
name: Install gometalinter
name: Install golangci-lint
environment:
GOLANGCI_LINT_TAG: v1.15.0
command: |
go get github.com/alecthomas/gometalinter
gometalinter --install
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -d -b $GOPATH/bin $GOLANGCI_LINT_TAG
- run:
name: Run gometalinter
environment:
CGO_ENABLED: 0
name: Lint
command: |
gometalinter ./...
golangci-lint run ./... -v
- run:
name: Test
command: |
Expand Down
4 changes: 3 additions & 1 deletion parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ func setupRemote(t *testing.T, dir string) (string, func()) {
func setupCommands(t *testing.T, dir, commands string) {
commands = "set -eo pipefail\n" + commands
script := path.Join(dir, "setup.sh")
ioutil.WriteFile(script, []byte(commands), 0644)
if err := ioutil.WriteFile(script, []byte(commands), 0644); err != nil {
t.Fatal(err)
}
cmd := exec.Command("bash", "setup.sh")
var stderr bytes.Buffer
var stdout bytes.Buffer
Expand Down
24 changes: 12 additions & 12 deletions printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (

const (
tAttribute rune = '@'
tColor = '#'
tReset = '_'
tData = '%'
tGroupOp = '['
tGroupCl = ']'
tEsc = '\\'
tColor rune = '#'
tReset rune = '_'
tData rune = '%'
tGroupOp rune = '['
tGroupCl rune = ']'
tEsc rune = '\\'
)

var attrs = map[rune]uint8{
Expand Down Expand Up @@ -53,12 +53,12 @@ var colors = map[rune]uint8{

const (
head rune = 'h'
untracked = 'u'
modified = 'm'
staged = 's'
conflicts = 'c'
ahead = 'a'
behind = 'b'
untracked rune = 'u'
modified rune = 'm'
staged rune = 's'
conflicts rune = 'c'
ahead rune = 'a'
behind rune = 'b'
)

type group struct {
Expand Down

0 comments on commit 2664dd3

Please sign in to comment.