Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
go vet
examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
No problems detected. Good job!
Gocyclo calculates cyclomatic complexities of functions in Go source code.
The cyclomatic complexity of a function is calculated according to the following rules:
1 is the base complexity of a function
+1 for each 'if', 'for', 'case', '&&' or '||'
Go Report Card warns on functions with cyclomatic complexity > 15.
No problems detected. Good job!
Golint is a linter for Go source code.
-
yamlkeys/common.go
- Line 3: warning: exported type Map should have comment or be unexported (golint)
- Line 5: warning: exported type Sequence should have comment or be unexported (golint)
-
yamlkeys/decode.go
- Line 11: warning: exported function Decode should have comment or be unexported (golint)
- Line 16: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 21: warning: exported function DecodeAll should have comment or be unexported (golint)
- Line 40: warning: exported function DecodeString should have comment or be unexported (golint)
- Line 44: warning: exported function DecodeStringAll should have comment or be unexported (golint)
- Line 48: warning: exported function DecodeNode should have comment or be unexported (golint)
- Line 61: warning: don't use underscores in Go names; var map_ should be map (golint)
- Line 77: warning: don't use underscores in Go names; var value_ should be value (golint)
- Line 138: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 146: warning: exported function DecodeKeyNode should have comment or be unexported (golint)
- Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
-
yamlkeys/equals.go
- Line 3: warning: exported function Equals should have comment or be unexported (golint)
- Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
-
yamlkeys/errors.go
- Line 15: warning: exported type DecodeError should have comment or be unexported (golint)
- Line 21: warning: exported function NewDecodeError should have comment or be unexported (golint)
- Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 42: warning: exported function NewDecodeErrorFor should have comment or be unexported (golint)
- Line 46: warning: exported function NewDuplicateKeyErrorFor should have comment or be unexported (golint)
- Line 50: warning: exported function WrapWithDecodeError should have comment or be unexported (golint)
-
yamlkeys/key.go
- Line 10: warning: exported function KeyData should have comment or be unexported (golint)
- Line 13: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 18: warning: exported function KeyString should have comment or be unexported (golint)
- Line 19: warning: don't use underscores in Go names; var string_ should be string (golint)
- Line 32: warning: exported type Key should have comment or be unexported (golint)
- Line 40: warning: exported type YAMLKey should have comment or be unexported (golint)
- Line 45: warning: exported function NewYAMLKey should have comment or be unexported (golint)
- Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 59: warning: comment on exported method YAMLKey.GetKeyData should be of the form "GetKeyData ..." (golint)
- Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 69: warning: comment on exported method YAMLKey.MarshalYAML should be of the form "MarshalYAML ..." (golint)
- Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 76: warning: exported function IsSimpleKey should have comment or be unexported (golint)
-
yamlkeys/map.go
- Line 3: warning: exported function MapGet should have comment or be unexported (golint)
- Line 3: warning: don't use underscores in Go names; func parameter map_ should be map (golint)
- Line 7: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 8: warning: don't use underscores in Go names; var key_ should be key (golint)
- Line 22: warning: exported function MapPut should have comment or be unexported (golint)
- Line 22: warning: don't use underscores in Go names; func parameter map_ should be map (golint)
- Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 31: warning: don't use underscores in Go names; var key_ should be key (golint)
- Line 50: warning: don't use underscores in Go names; var key_ should be key (golint)
- Line 63: warning: exported function MapDelete should have comment or be unexported (golint)
- Line 63: warning: don't use underscores in Go names; func parameter map_ should be map (golint)
- Line 70: warning: don't use underscores in Go names; var key_ should be key (golint)
- Line 84: warning: exported function MapMerge should have comment or be unexported (golint)
- Line 91: warning: don't use underscores in Go names; var key_ should be key (golint)
-
yamlkeys/clone.go
- Line 3: warning: exported function Clone should have comment or be unexported (golint)
- Line 4: warning: don't use underscores in Go names; var value_ should be value (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!