mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
chore: clean up linting configuration (#1343)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user