Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: "2"

run:
timeout: 5m

linters:
default: standard
enable:
- bodyclose
- copyloopvar
- errname
- errorlint
- exhaustive
- goconst
- gocritic
- gocyclo
- misspell
- nilerr
- noctx
- prealloc
- revive
- unconvert
- unparam
- whitespace
settings:
exhaustive:
default-signifies-exhaustive: true
gocyclo:
min-complexity: 10
goconst:
min-len: 3
min-occurrences: 5
misspell:
locale: US
revive:
rules:
- name: exported
disabled: true
- name: var-naming
disabled: true
- name: unused-parameter
disabled: true
exclusions:
generated: lax
presets:
- comments
- std-error-handling
rules:
- path: _test\.go
linters:
- goconst
- gocyclo
- errcheck
- unparam
- linters:
- errname
text: "ErrorResponse"

formatters:
Comment thread
WispHes marked this conversation as resolved.
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/Edge-Center)
exclusions:
generated: strict

issues:
max-issues-per-linter: 0
max-same-issues: 0
6 changes: 4 additions & 2 deletions checks/checkdns/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ type CheckDNS struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckDNS
type Response = CheckDNS
type (
Request = CheckDNS
Response = CheckDNS
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions checks/checkhttp/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ type CheckHTTP struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckHTTP
type Response = CheckHTTP
type (
Request = CheckHTTP
Response = CheckHTTP
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions checks/checkping/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ type CheckPing struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckPing
type Response = CheckPing
type (
Request = CheckPing
Response = CheckPing
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions checks/checkrabbitmq/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ type CheckRabbitMQ struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckRabbitMQ
type Response = CheckRabbitMQ
type (
Request = CheckRabbitMQ
Response = CheckRabbitMQ
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions checks/checksmtp/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ type CheckSMTP struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckSMTP
type Response = CheckSMTP
type (
Request = CheckSMTP
Response = CheckSMTP
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions checks/checktcp/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ type CheckTCP struct {
Runbook string `json:"runbook,omitempty"`
}

type Request = CheckTCP
type Response = CheckTCP
type (
Request = CheckTCP
Response = CheckTCP
)

type CreateResponse struct {
ID int `json:"id"`
Expand Down
6 changes: 4 additions & 2 deletions edgecenter/provider/client_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package provider

import (
"context"
"github.com/Edge-Center/edgecenteredgemon-go/edgecenter"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
"reflect"
"testing"
"time"

"github.com/stretchr/testify/assert"

"github.com/Edge-Center/edgecenteredgemon-go/edgecenter"
)

func TestAuthenticatedHeaders(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion edgecenter/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package provider
import (
"context"
"encoding/json"
"github.com/Edge-Center/edgecenteredgemon-go/edgecenter"
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/Edge-Center/edgecenteredgemon-go/edgecenter"
)

func TestClient_Request(t *testing.T) {
Expand Down