Skip to content

Commit

Permalink
Add gofmt check in CI (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyreiss authored Oct 3, 2018
1 parent b93202d commit dcc6585
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
- checkout
- run: go get -v -t -d ./...
- run: go test -v ./...
- run: diff -u <(echo -n) <(gofmt -d -s .)
8 changes: 4 additions & 4 deletions firemodel/cmd/compile.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package cmd

import (
"github.com/spf13/cobra"
"os"
"github.com/mickeyreiss/firemodel"
"github.com/mickeyreiss/firemodel/internal/tempwriter"
"fmt"
"github.com/go-errors/errors"
"github.com/mickeyreiss/firemodel"
"github.com/mickeyreiss/firemodel/internal/tempwriter"
"github.com/spf13/cobra"
"os"
)

var compileReq struct {
Expand Down
2 changes: 1 addition & 1 deletion firemodel/cmd/show.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/spf13/cobra"
"fmt"
"github.com/mickeyreiss/firemodel"
"github.com/spf13/cobra"
)

var showCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions internal/tempwriter/tempwriter.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package tempwriter

import (
"io"
"io/ioutil"
"os"
"path"
"io/ioutil"
"path/filepath"
"io"
)

func New(prefix string, wipe bool) *TempWriter {
Expand Down
20 changes: 10 additions & 10 deletions langs/ios/ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ var (
tpl = template.Must(template.
New("file").
Funcs(map[string]interface{}{
"firemodelVersion": func() string { return version.Version },
"toSwiftType": toSwiftType,
"toScreamingSnake": strcase.ToScreamingSnake,
"toCamel": strcase.ToCamel,
"toLowerCamel": strcase.ToLowerCamel,
"filterFieldsEnumsOnly": filterFieldsEnumsOnly,
"filterFieldsNonEnumsOnly": filterFieldsNonEnumsOnly,
"filterFieldsStructsOnly": filterFieldsStructsOnly,
"requiresCustomEncodeDecode": requiresCustomEncodeDecode,
"firestorePath": firestorePath,
"firemodelVersion": func() string { return version.Version },
"toSwiftType": toSwiftType,
"toScreamingSnake": strcase.ToScreamingSnake,
"toCamel": strcase.ToCamel,
"toLowerCamel": strcase.ToLowerCamel,
"filterFieldsEnumsOnly": filterFieldsEnumsOnly,
"filterFieldsNonEnumsOnly": filterFieldsNonEnumsOnly,
"filterFieldsStructsOnly": filterFieldsStructsOnly,
"requiresCustomEncodeDecode": requiresCustomEncodeDecode,
"firestorePath": firestorePath,
}).
Parse(file),
)
Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestURL_Set(t *testing.T) {
tt.raw.Set(tt.args)
got := tt.raw
if !reflect.DeepEqual(*got, *tt.exp) {
t.Errorf("URL.Set() = %v, want %v", *got, * tt.exp)
t.Errorf("URL.Set() = %v, want %v", *got, *tt.exp)
}
}
})
Expand Down

0 comments on commit dcc6585

Please sign in to comment.