Skip to content

Commit

Permalink
GolangCi enable comments validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Vilgelm committed May 4, 2020
1 parent 33311f5 commit 83a76a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ linters-settings:
simplify: true

issues:
exclude-use-default: false
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- dupl
- gosec
exclude:
- should have a package comment
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (e HTTPErrorResponse) String() string {
return res.String()
}

// HasError validates that error is not emptyp
// NotEmpty validates that error is not emptyp
func (e HTTPErrorResponse) NotEmpty() bool {
return len(e.Error) > 0 || len(e.Message) > 0 || len(e.Description) > 0
}
2 changes: 2 additions & 0 deletions models.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ type GetGroupsParams struct {
BriefRepresentation *bool `json:"briefRepresentation,string,omitempty"`
}

// MarshalJSON is a custom json marshaling function to automatically set the Full and BriefRepresentation properties
// for backward compatibility
func (obj GetGroupsParams) MarshalJSON() ([]byte, error) {
type Alias GetGroupsParams
a := (Alias)(obj)
Expand Down

0 comments on commit 83a76a9

Please sign in to comment.