Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Use '//nolint' when disabling linters #114

Merged
merged 1 commit into from
Dec 11, 2019
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
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import (

// Logger is an instance of log.Logger that is use to provide debug information about running Sentry Client
// can be enabled by either using `Logger.SetOutput` directly or with `Debug` client option
var Logger = log.New(ioutil.Discard, "[Sentry] ", log.LstdFlags) // nolint: gochecknoglobals
var Logger = log.New(ioutil.Discard, "[Sentry] ", log.LstdFlags) //nolint: gochecknoglobals

type EventProcessor func(event *Event, hint *EventHint) *Event

type EventModifier interface {
ApplyToEvent(event *Event, hint *EventHint) *Event
}

var globalEventProcessors []EventProcessor // nolint: gochecknoglobals
var globalEventProcessors []EventProcessor //nolint: gochecknoglobals

func AddGlobalEventProcessor(processor EventProcessor) {
globalEventProcessors = append(globalEventProcessors, processor)
Expand Down
2 changes: 1 addition & 1 deletion hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const defaultMaxBreadcrumbs = 30
const maxBreadcrumbs = 100

// Initial instance of the Hub that has no `Client` bound and an empty `Scope`
var currentHub = NewHub(nil, NewScope()) // nolint: gochecknoglobals
var currentHub = NewHub(nil, NewScope()) //nolint: gochecknoglobals

// Hub is the central object that can manages scopes and clients.
//
Expand Down
2 changes: 1 addition & 1 deletion sourcereader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
)

// nolint: gochecknoglobals
//nolint: gochecknoglobals
var input = [][]byte{
[]byte("line 1"),
[]byte("line 2"),
Expand Down
2 changes: 1 addition & 1 deletion stacktrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

const unknown string = "unknown"

// nolint: gochecknoglobals
//nolint: gochecknoglobals
var (
isTestFileRegexp = regexp.MustCompile(`getsentry/sentry-go/.+_test.go`)
isExampleFileRegexp = regexp.MustCompile(`getsentry/sentry-go/example/`)
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func fileExists(fileName string) bool {
return true
}

// nolint: deadcode, unused
//nolint: deadcode, unused
func prettyPrint(data interface{}) {
dbg, _ := json.MarshalIndent(data, "", " ")
fmt.Println(string(dbg))
Expand Down