chore: clean up linting configuration (#1343)

This commit is contained in:
Christopher Angelo Phillips
2022-11-16 16:28:09 +00:00
committed by GitHub
parent f8be64d312
commit 0774ad15e2
31 changed files with 67 additions and 50 deletions
@@ -2,6 +2,7 @@ package php
import (
"encoding/json"
"errors"
"fmt"
"io"
@@ -25,7 +26,7 @@ func parseComposerLock(_ source.FileResolver, _ *generic.Environment, reader sou
for {
var lock composerLock
if err := dec.Decode(&lock); err == io.EOF {
if err := dec.Decode(&lock); errors.Is(err, io.EOF) {
break
} else if err != nil {
return nil, nil, fmt.Errorf("failed to parse composer.lock file: %w", err)
@@ -2,6 +2,7 @@ package php
import (
"encoding/json"
"errors"
"fmt"
"io"
@@ -46,7 +47,7 @@ func parseInstalledJSON(_ source.FileResolver, _ *generic.Environment, reader so
for {
var lock installedJSONComposerV2
if err := dec.Decode(&lock); err == io.EOF {
if err := dec.Decode(&lock); errors.Is(err, io.EOF) {
break
} else if err != nil {
return nil, nil, fmt.Errorf("failed to parse installed.json file: %w", err)