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 python
import (
"encoding/json"
"errors"
"fmt"
"io"
"strings"
@@ -44,7 +45,7 @@ func parsePipfileLock(_ source.FileResolver, _ *generic.Environment, reader sour
for {
var lock pipfileLock
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 Pipfile.lock file: %w", err)
@@ -3,6 +3,7 @@ package python
import (
"bufio"
"encoding/csv"
"errors"
"fmt"
"io"
"path/filepath"
@@ -20,7 +21,7 @@ func parseWheelOrEggRecord(reader io.Reader) []pkg.PythonFileRecord {
for {
recordList, err := r.Read()
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
}
if err != nil {
@@ -70,7 +71,7 @@ func parseInstalledFiles(reader io.Reader, location, sitePackagesRootPath string
for {
line, err := r.ReadString('\n')
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
}
if err != nil {