Skip to content

Commit

Permalink
Tweak lint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dansimau committed Dec 24, 2024
1 parent 03fe1b4 commit 4822c97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ linters-settings:
case:
rules:
json: snake
varnamelen:
max-distance: 12
min-name-length: 2

severity:
default-severity: info
Expand Down
2 changes: 2 additions & 0 deletions entity_light.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (l *Light) IsOn() bool {
func (l *Light) TurnOn() error {
if l.connection == nil {
slog.Error("Light not registered", "entity", l.GetID())

return ErrEntityNotRegistered
}

Expand All @@ -51,6 +52,7 @@ func (l *Light) TurnOn() error {
func (l *Light) TurnOff() error {
if l.connection == nil {
slog.Error("Light not registered", "entity", l.GetID())

return ErrEntityNotRegistered
}

Expand Down

0 comments on commit 4822c97

Please sign in to comment.