Repository: zegl/kube-score
Pull request #473 (2022-05-27 19:02:00)

Add codeball


Patch:
diff --git a/.github/workflows/codeball.yml b/.github/workflows/codeball.yml
new file mode 100644
index 0000000..f5d9ded
--- /dev/null
+++ b/.github/workflows/codeball.yml
@@ -0,0 +1,14 @@
+name: Codeball
+on: [pull_request]
+
+jobs:
+  codeball_job:
+    runs-on: ubuntu-latest
+    name: Run Codeball
+    steps:
+      - name: Codeball AI Actions
+        uses: sturdy-dev/codeball-action@v1
+        with:
+          #   do-label: "true"                    # Configure if the action should label approved contributions
+          #   label-name: "codeball:approved"     # Configure the label name to set if Codeball approves the contribution
+          do-approve: "false"                  # Configure if the action should approve PRs that have been approved by Codeball
diff --git a/README.md b/README.md
index 568b943..127c3fe 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ Flags for score:
       --ignore-container-memory-limit       Disables the requirement of setting a container memory limit
       --ignore-test strings                 Disable a test, can be set multiple times
       --kubernetes-version string           Setting the kubernetes-version will affect the checks ran against the manifests. Set this to the version of Kubernetes that you're using in production for the best results. (default "v1.18")
-  -o, --output-format string                Set to 'human', 'json', 'ci' or 'sarif'. If set to ci, kube-score will output the program in a format that is easier to parse by other programs. Sarif output allows for easier integration with CI platforms. (default "human")
+  -o, --output-format string                Set to 'human', 'json' or 'ci'. If set to ci, kube-score will output the program in a format that is easier to parse by other programs. (default "human")
       --output-version string               Changes the version of the --output-format. The 'json' format has version 'v2' (default) and 'v1' (deprecated, will be removed in v1.7.0). The 'human' and 'ci' formats has only version 'v1' (default). If not explicitly set, the default version for that particular output format will be used.
   -v, --verbose count                       Enable verbose output, can be set multiple times for increased verbosity.
 ```
diff --git a/cmd/kube-score/kustomize.Dockerfile b/cmd/kube-score/kustomize.Dockerfile
index 0bc9828..46e6b06 100644
--- a/cmd/kube-score/kustomize.Dockerfile
+++ b/cmd/kube-score/kustomize.Dockerfile
@@ -1,7 +1,7 @@
 FROM debian:stretch as downloader
 
-ARG KUSTOMIZE_VERSION=v4.5.4
-ARG KUSTOMIZE_SHA256SUM="1159c5c17c964257123b10e7d8864e9fe7f9a580d4124a388e746e4003added3"
+ARG KUSTOMIZE_VERSION=v3.8.1
+ARG KUSTOMIZE_SHA256SUM="9d5b68f881ba89146678a0399469db24670cba4813e0299b47cb39a240006f37"
 
 RUN apt-get update && \
     apt-get install -y curl && \
diff --git a/cmd/kube-score/main.go b/cmd/kube-score/main.go
index 920ae6c..9529cfc 100644
--- a/cmd/kube-score/main.go
+++ b/cmd/kube-score/main.go
@@ -104,7 +104,7 @@ func scoreFiles(binName string, args []string) error {
 	ignoreContainerMemoryLimit := fs.Bool("ignore-container-memory-limit", false, "Disables the requirement of setting a container memory limit")
 	verboseOutput := fs.CountP("verbose", "v", "Enable verbose output, can be set multiple times for increased verbosity.")
 	printHelp := fs.Bool("help", false, "Print help")
-	outputFormat := fs.StringP("output-format", "o", "human", "Set to 'human', 'json', 'ci' or 'sarif'. If set to ci, kube-score will output the program in a format that is easier to parse by other programs. Sarif output allows for easier integration with CI platforms.")
+	outputFormat := fs.StringP("output-format", "o", "human", "Set to 'human', 'json' or 'ci'. If set to ci, kube-score will output the program in a format that is easier to parse by other programs.")
 	outputVersion := fs.String("output-version", "", "Changes the version of the --output-format. The 'json' format has version 'v2' (default) and 'v1' (deprecated, will be removed in v1.7.0). The 'human' and 'ci' formats has only version 'v1' (default). If not explicitly set, the default version for that particular output format will be used.")
 	optionalTests := fs.StringSlice("enable-optional-test", []string{}, "Enable an optional test, can be set multiple times")
 	ignoreTests := fs.StringSlice("ignore-test", []string{}, "Disable a test, can be set multiple times")
@@ -175,14 +175,9 @@ Use "-" as filename to read from STDIN.`, execName(binName))
 		KubernetesVersion:                     kubeVer,
 	}
 
-	p, err := parser.New()
+	parsedFiles, err := parser.ParseFiles(cnf)
 	if err != nil {
-		return fmt.Errorf("failed to initializer parser: %w", err)
-	}
-
-	parsedFiles, err := p.ParseFiles(cnf)
-	if err != nil {
-		return fmt.Errorf("failed to parse files: %w", err)
+		return err
 	}
 
 	scoreCard, err := score.Score(parsedFiles, cnf)
@@ -218,10 +213,8 @@ Use "-" as filename to read from STDIN.`, execName(binName))
 		if err != nil {
 			termWidth = 80
 		}
-		r, err = human.Human(scoreCard, *verboseOutput, termWidth)
-		if err != nil {
-			return err
-		}
+		_, err = human.Human(scoreCard, *verboseOutput, termWidth)
+		return err
 	case *outputFormat == "ci" && version == "v1":
 		r = ci.CI(scoreCard)
 	case *outputFormat == "sarif":
diff --git a/go.mod b/go.mod
index 31e6c3e..c81637e 100644
--- a/go.mod
+++ b/go.mod
@@ -3,13 +3,13 @@ module github.com/zegl/kube-score
 require (
 	github.com/eidolon/wordwrap v0.0.0-20161011182207-e0f54129b8bb
 	github.com/fatih/color v1.13.0
-	github.com/google/go-cmp v0.5.8
+	github.com/google/go-cmp v0.5.7
 	github.com/spf13/pflag v1.0.5
 	github.com/stretchr/testify v1.7.1
-	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
+	golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
 	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
-	k8s.io/api v0.24.0
-	k8s.io/apimachinery v0.24.0
+	k8s.io/api v0.23.5
+	k8s.io/apimachinery v0.23.5
 	sigs.k8s.io/yaml v1.3.0 // indirect
 )
 
diff --git a/go.sum b/go.sum
index a976431..3cf523f 100644
--- a/go.sum
+++ b/go.sum
@@ -3,7 +3,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
@@ -48,18 +47,19 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
 github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
-github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
+github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
 github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
@@ -140,8 +140,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
 golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
-golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
-golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
+golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -163,18 +163,18 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
-golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c=
+golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -190,6 +190,7 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -234,21 +235,21 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v
 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-k8s.io/api v0.24.0 h1:J0hann2hfxWr1hinZIDefw7Q96wmCBx6SSB8IY0MdDg=
-k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I=
-k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ=
-k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
+k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA=
+k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8=
+k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0=
+k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
 k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
 k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
 k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
-k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc=
-k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
-k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
+k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw=
+k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
+k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
 k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
-k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y=
-sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
+k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE=
+k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s=
+sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
diff --git a/parser/parse.go b/parser/parse.go
index ddf0908..ad561fc 100644
--- a/parser/parse.go
+++ b/parser/parse.go
@@ -36,43 +36,64 @@ import (
 	internalservice "github.com/zegl/kube-score/parser/internal/service"
 )
 
-type Parser struct {
-	scheme *runtime.Scheme
-	codecs serializer.CodecFactory
+var scheme = runtime.NewScheme()
+var codecs = serializer.NewCodecFactory(scheme)
+
+func init() {
+	if err := addToScheme(scheme); err != nil {
+		panic(err)
+	}
 }
 
-type schemaAdderFunc func(scheme *runtime.Scheme) error
+func addToScheme(scheme *runtime.Scheme) error {
+	err := corev1.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
+
+	err = appsv1.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
 
-func New() (*Parser, error) {
-	scheme := runtime.NewScheme()
-	p := &Parser{
-		scheme: scheme,
-		codecs: serializer.NewCodecFactory(scheme),
+	err = networkingv1.AddToScheme(scheme)
+	if err != nil {
+		return err
 	}
-	if err := p.addToScheme(); err != nil {
-		return nil, fmt.Errorf("failed to init: %w", err)
+
+	err = extensionsv1beta1.AddToScheme(scheme)
+	if err != nil {
+		return err
 	}
-	return p, nil
-}
 
-func (p *Parser) addToScheme() error {
-	var adders = []schemaAdderFunc{
-		corev1.AddToScheme,
-		appsv1.AddToScheme,
-		networkingv1.AddToScheme,
-		extensionsv1beta1.AddToScheme,
-		appsv1beta1.AddToScheme,
-		appsv1beta2.AddToScheme,
-		batchv1.AddToScheme,
-		batchv1beta1.AddToScheme,
-		policyv1beta1.AddToScheme,
-		policyv1.AddToScheme,
+	err = appsv1beta1.AddToScheme(scheme)
+	if err != nil {
+		return err
 	}
 
-	for _, adder := range adders {
-		if err := adder(p.scheme); err != nil {
-			return fmt.Errorf("failed to add type to schema: %w", err)
-		}
+	err = appsv1beta2.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
+
+	err = batchv1.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
+
+	err = batchv1beta1.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
+
+	err = policyv1beta1.AddToScheme(scheme)
+	if err != nil {
+		return err
+	}
+
+	err = policyv1.AddToScheme(scheme)
+	if err != nil {
+		return err
 	}
 
 	return nil
@@ -145,7 +166,7 @@ func Empty() ks.AllTypes {
 	return &parsedObjects{}
 }
 
-func (p *Parser) ParseFiles(cnf config.Configuration) (ks.AllTypes, error) {
+func ParseFiles(cnf config.Configuration) (ks.AllTypes, error) {
 	s := &parsedObjects{}
 
 	for _, namedReader := range cnf.AllFiles {
@@ -168,7 +189,8 @@ func (p *Parser) ParseFiles(cnf config.Configuration) (ks.AllTypes, error) {
 		for _, fileContents := range bytes.Split(fullFile, []byte("\n---\n")) {
 
 			if len(bytes.TrimSpace(fileContents)) > 0 {
-				if err := p.detectAndDecode(cnf, s, namedReader.Name(), offset, fileContents); err != nil {
+				err := detectAndDecode(cnf, s, namedReader.Name(), offset, fileContents)
+				if err != nil {
 					return nil, err
 				}
 			}
@@ -180,7 +202,7 @@ func (p *Parser) ParseFiles(cnf config.Configuration) (ks.AllTypes, error) {
 	return s, nil
 }
 
-func (p *Parser) detectAndDecode(cnf config.Configuration, s *parsedObjects, fileName string, fileOffset int, raw []byte) error {
+func detectAndDecode(cnf config.Configuration, s *parsedObjects, fileName string, fileOffset int, raw []byte) error {
 	var detect detectKind
 	err := yaml.Unmarshal(raw, &detect)
 	if err != nil {
@@ -192,12 +214,12 @@ func (p *Parser) detectAndDecode(cnf config.Configuration, s *parsedObjects, fil
 	// Parse lists and their items recursively
 	if detectedVersion == corev1.SchemeGroupVersion.WithKind("List") {
 		var list corev1.List
-		err := p.decode(raw, &list)
+		err := decode(raw, &list)
 		if err != nil {
 			return err
 		}
 		for _, listItem := range list.Items {
-			err := p.detectAndDecode(cnf, s, fileName, fileOffset, listItem.Raw)
+			err := detectAndDecode(cnf, s, fileName, fileOffset, listItem.Raw)
 			if err != nil {
 				return err
 			}
@@ -205,7 +227,7 @@ func (p *Parser) detectAndDecode(cnf config.Configuration, s *parsedObjects, fil
 		return nil
 	}
 
-	err = p.decodeItem(cnf, s, detectedVersion, fileName, fileOffset, raw)
+	err = decodeItem(cnf, s, detectedVersion, fileName, fileOffset, raw)
 	if err != nil {
 		return err
 	}
@@ -213,8 +235,8 @@ func (p *Parser) detectAndDecode(cnf config.Configuration, s *parsedObjects, fil
 	return nil
 }
 
-func (p *Parser) decode(data []byte, object runtime.Object) error {
-	deserializer := p.codecs.UniversalDeserializer()
+func decode(data []byte, object runtime.Object) error {
+	deserializer := codecs.UniversalDeserializer()
 	if _, _, err := deserializer.Decode(data, nil, object); err != nil {
 		gvk := object.GetObjectKind().GroupVersionKind()
 		return fmt.Errorf("Failed to parse %s: err=%w", gvk, err)
@@ -240,7 +262,7 @@ func detectFileLocation(fileName string, fileOffset int, fileContents []byte) ks
 	}
 }
 
-func (p *Parser) decodeItem(cnf config.Configuration, s *parsedObjects, detectedVersion schema.GroupVersionKind, fileName string, fileOffset int, fileContents []byte) error {
+func decodeItem(cnf config.Configuration, s *parsedObjects, detectedVersion schema.GroupVersionKind, fileName string, fileOffset int, fileContents []byte) error {
 	addPodSpeccer := func(ps ks.PodSpecer) {
 		s.podspecers = append(s.podspecers, ps)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: ps.GetTypeMeta(), ObjectMeta: ps.GetObjectMeta(), FileLocationer: ps})
@@ -253,33 +275,33 @@ func (p *Parser) decodeItem(cnf config.Configuration, s *parsedObjects, detected
 	switch detectedVersion {
 	case corev1.SchemeGroupVersion.WithKind("Pod"):
 		var pod corev1.Pod
-		errs.AddIfErr(p.decode(fileContents, &pod))
+		errs.AddIfErr(decode(fileContents, &pod))
 		p := internalpod.Pod{Obj: pod, Location: fileLocation}
 		s.pods = append(s.pods, p)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: pod.TypeMeta, ObjectMeta: pod.ObjectMeta, FileLocationer: p})
 
 	case batchv1.SchemeGroupVersion.WithKind("Job"):
 		var job batchv1.Job
-		errs.AddIfErr(p.decode(fileContents, &job))
+		errs.AddIfErr(decode(fileContents, &job))
 		addPodSpeccer(internal.Batchv1Job{Job: job, Location: fileLocation})
 
 	case batchv1beta1.SchemeGroupVersion.WithKind("CronJob"):
 		var cronjob batchv1beta1.CronJob
-		errs.AddIfErr(p.decode(fileContents, &cronjob))
+		errs.AddIfErr(decode(fileContents, &cronjob))
 		cjob := internalcronjob.CronJobV1beta1{Obj: cronjob, Location: fileLocation}
 		addPodSpeccer(cjob)
 		s.cronjobs = append(s.cronjobs, cjob)
 
 	case batchv1.SchemeGroupVersion.WithKind("CronJob"):
 		var cronjob batchv1.CronJob
-		errs.AddIfErr(p.decode(fileContents, &cronjob))
+		errs.AddIfErr(decode(fileContents, &cronjob))
 		cjob := internalcronjob.CronJobV1{Obj: cronjob, Location: fileLocation}
 		addPodSpeccer(cjob)
 		s.cronjobs = append(s.cronjobs, cjob)
 
 	case appsv1.SchemeGroupVersion.WithKind("Deployment"):
 		var deployment appsv1.Deployment
-		errs.AddIfErr(p.decode(fileContents, &deployment))
+		errs.AddIfErr(decode(fileContents, &deployment))
 		deploy := internal.Appsv1Deployment{Obj: deployment, Location: fileLocation}
 		addPodSpeccer(deploy)
 
@@ -287,20 +309,20 @@ func (p *Parser) decodeItem(cnf config.Configuration, s *parsedObjects, detected
 		s.deployments = append(s.deployments, deploy)
 	case appsv1beta1.SchemeGroupVersion.WithKind("Deployment"):
 		var deployment appsv1beta1.Deployment
-		errs.AddIfErr(p.decode(fileContents, &deployment))
+		errs.AddIfErr(decode(fileContents, &deployment))
 		addPodSpeccer(internal.Appsv1beta1Deployment{Deployment: deployment, Location: fileLocation})
 	case appsv1beta2.SchemeGroupVersion.WithKind("Deployment"):
 		var deployment appsv1beta2.Deployment
-		errs.AddIfErr(p.decode(fileContents, &deployment))
+		errs.AddIfErr(decode(fileContents, &deployment))
 		addPodSpeccer(internal.Appsv1beta2Deployment{Deployment: deployment, Location: fileLocation})
 	case extensionsv1beta1.SchemeGroupVersion.WithKind("Deployment"):
 		var deployment extensionsv1beta1.Deployment
-		errs.AddIfErr(p.decode(fileContents, &deployment))
+		errs.AddIfErr(decode(fileContents, &deployment))
 		addPodSpeccer(internal.Extensionsv1beta1Deployment{Deployment: deployment, Location: fileLocation})
 
 	case appsv1.SchemeGroupVersion.WithKind("StatefulSet"):
 		var statefulSet appsv1.StatefulSet
-		errs.AddIfErr(p.decode(fileContents, &statefulSet))
+		errs.AddIfErr(decode(fileContents, &statefulSet))
 		sset := internal.Appsv1StatefulSet{Obj: statefulSet, Location: fileLocation}
 		addPodSpeccer(sset)
 
@@ -308,49 +330,49 @@ func (p *Parser) decodeItem(cnf config.Configuration, s *parsedObjects, detected
 		s.statefulsets = append(s.statefulsets, sset)
 	case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSet"):
 		var statefulSet appsv1beta1.StatefulSet
-		errs.AddIfErr(p.decode(fileContents, &statefulSet))
+		errs.AddIfErr(decode(fileContents, &statefulSet))
 		addPodSpeccer(internal.Appsv1beta1StatefulSet{StatefulSet: statefulSet, Location: fileLocation})
 	case appsv1beta2.SchemeGroupVersion.WithKind("StatefulSet"):
 		var statefulSet appsv1beta2.StatefulSet
-		errs.AddIfErr(p.decode(fileContents, &statefulSet))
+		errs.AddIfErr(decode(fileContents, &statefulSet))
 		addPodSpeccer(internal.Appsv1beta2StatefulSet{StatefulSet: statefulSet, Location: fileLocation})
 
 	case appsv1.SchemeGroupVersion.WithKind("DaemonSet"):
 		var daemonset appsv1.DaemonSet
-		errs.AddIfErr(p.decode(fileContents, &daemonset))
+		errs.AddIfErr(decode(fileContents, &daemonset))
 		addPodSpeccer(internal.Appsv1DaemonSet{DaemonSet: daemonset, Location: fileLocation})
 	case appsv1beta2.SchemeGroupVersion.WithKind("DaemonSet"):
 		var daemonset appsv1beta2.DaemonSet
-		errs.AddIfErr(p.decode(fileContents, &daemonset))
+		errs.AddIfErr(decode(fileContents, &daemonset))
 		addPodSpeccer(internal.Appsv1beta2DaemonSet{DaemonSet: daemonset, Location: fileLocation})
 	case extensionsv1beta1.SchemeGroupVersion.WithKind("DaemonSet"):
 		var daemonset extensionsv1beta1.DaemonSet
-		errs.AddIfErr(p.decode(fileContents, &daemonset))
+		errs.AddIfErr(decode(fileContents, &daemonset))
 		addPodSpeccer(internal.Extensionsv1beta1DaemonSet{DaemonSet: daemonset, Location: fileLocation})
 
 	case networkingv1.SchemeGroupVersion.WithKind("NetworkPolicy"):
 		var netpol networkingv1.NetworkPolicy
-		errs.AddIfErr(p.decode(fileContents, &netpol))
+		errs.AddIfErr(decode(fileContents, &netpol))
 		np := internalnetpol.NetworkPolicy{Obj: netpol, Location: fileLocation}
 		s.networkPolicies = append(s.networkPolicies, np)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: netpol.TypeMeta, ObjectMeta: netpol.ObjectMeta, FileLocationer: np})
 
 	case corev1.SchemeGroupVersion.WithKind("Service"):
 		var service corev1.Service
-		errs.AddIfErr(p.decode(fileContents, &service))
+		errs.AddIfErr(decode(fileContents, &service))
 		serv := internalservice.Service{Obj: service, Location: fileLocation}
 		s.services = append(s.services, serv)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: service.TypeMeta, ObjectMeta: service.ObjectMeta, FileLocationer: serv})
 
 	case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudget"):
 		var disruptBudget policyv1beta1.PodDisruptionBudget
-		errs.AddIfErr(p.decode(fileContents, &disruptBudget))
+		errs.AddIfErr(decode(fileContents, &disruptBudget))
 		dbug := internalpdb.PodDisruptionBudgetV1beta1{Obj: disruptBudget, Location: fileLocation}
 		s.podDisruptionBudgets = append(s.podDisruptionBudgets, dbug)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: disruptBudget.TypeMeta, ObjectMeta: disruptBudget.ObjectMeta, FileLocationer: dbug})
 	case policyv1.SchemeGroupVersion.WithKind("PodDisruptionBudget"):
 		var disruptBudget policyv1.PodDisruptionBudget
-		errs.AddIfErr(p.decode(fileContents, &disruptBudget))
+		errs.AddIfErr(decode(fileContents, &disruptBudget))
 		dbug := internalpdb.PodDisruptionBudgetV1{Obj: disruptBudget, Location: fileLocation}
 		s.podDisruptionBudgets = append(s.podDisruptionBudgets, dbug)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{
@@ -361,42 +383,42 @@ func (p *Parser) decodeItem(cnf config.Configuration, s *parsedObjects, detected
 
 	case extensionsv1beta1.SchemeGroupVersion.WithKind("Ingress"):
 		var ingress extensionsv1beta1.Ingress
-		errs.AddIfErr(p.decode(fileContents, &ingress))
+		errs.AddIfErr(decode(fileContents, &ingress))
 		ing := internal.ExtensionsIngressV1beta1{Ingress: ingress, Location: fileLocation}
 		s.ingresses = append(s.ingresses, ing)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: ingress.TypeMeta, ObjectMeta: ingress.ObjectMeta, FileLocationer: ing})
 
 	case networkingv1beta1.SchemeGroupVersion.WithKind("Ingress"):
 		var ingress networkingv1beta1.Ingress
-		errs.AddIfErr(p.decode(fileContents, &ingress))
+		errs.AddIfErr(decode(fileContents, &ingress))
 		ing := internal.IngressV1beta1{Ingress: ingress, Location: fileLocation}
 		s.ingresses = append(s.ingresses, ing)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: ingress.TypeMeta, ObjectMeta: ingress.ObjectMeta, FileLocationer: ing})
 
 	case networkingv1.SchemeGroupVersion.WithKind("Ingress"):
 		var ingress networkingv1.Ingress
-		errs.AddIfErr(p.decode(fileContents, &ingress))
+		errs.AddIfErr(decode(fileContents, &ingress))
 		ing := internal.IngressV1{Ingress: ingress, Location: fileLocation}
 		s.ingresses = append(s.ingresses, ing)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: ingress.TypeMeta, ObjectMeta: ingress.ObjectMeta, FileLocationer: ing})
 
 	case autoscalingv1.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"):
 		var hpa autoscalingv1.HorizontalPodAutoscaler
-		errs.AddIfErr(p.decode(fileContents, &hpa))
+		errs.AddIfErr(decode(fileContents, &hpa))
 		h := internal.HPAv1{HorizontalPodAutoscaler: hpa, Location: fileLocation}
 		s.hpaTargeters = append(s.hpaTargeters, h)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: hpa.TypeMeta, ObjectMeta: hpa.ObjectMeta, FileLocationer: h})
 
 	case autoscalingv2beta1.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"):
 		var hpa autoscalingv2beta1.HorizontalPodAutoscaler
-		errs.AddIfErr(p.decode(fileContents, &hpa))
+		errs.AddIfErr(decode(fileContents, &hpa))
 		h := internal.HPAv2beta1{HorizontalPodAutoscaler: hpa, Location: fileLocation}
 		s.hpaTargeters = append(s.hpaTargeters, h)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{TypeMeta: hpa.TypeMeta, ObjectMeta: hpa.ObjectMeta, FileLocationer: h})
 
 	case autoscalingv2beta2.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"):
 		var hpa autoscalingv2beta2.HorizontalPodAutoscaler
-		errs.AddIfErr(p.decode(fileContents, &hpa))
+		errs.AddIfErr(decode(fileContents, &hpa))
 		h := internal.HPAv2beta2{HorizontalPodAutoscaler: hpa, Location: fileLocation}
 		s.hpaTargeters = append(s.hpaTargeters, h)
 		s.bothMetas = append(s.bothMetas, ks.BothMeta{
diff --git a/renderer/human/human.go b/renderer/human/human.go
index af37868..480ae0f 100644
--- a/renderer/human/human.go
+++ b/renderer/human/human.go
@@ -37,28 +37,24 @@ func Human(scoreCard *scorecard.Scorecard, verboseOutput int, termWidth int) (io
 		}
 
 		// Adjust to termsize
-		_, err := fmt.Fprint(w, safeRepeat(" ", min(80, termWidth)-writtenHeaderChars-2))
-		if err != nil {
-			return nil, fmt.Errorf("failed to write terminal padding: %w", err)
-		}
+		fmt.Fprint(w, safeRepeat(" ", min(80, termWidth)-writtenHeaderChars-2))
 
 		switch {
 		case scoredObject.AnyBelowOrEqualToGrade(scorecard.GradeCritical):
-			_, err = fmt.Fprintf(w, "💥\n")
+			fmt.Fprintf(w, "💥\n")
 		case scoredObject.AnyBelowOrEqualToGrade(scorecard.GradeWarning):
-			_, err = fmt.Fprintf(w, "🤔\n")
+			fmt.Fprintf(w, "🤔\n")
 		default:
-			_, err = fmt.Fprintf(w, "✅\n")
-		}
-		if err != nil {
-			return nil, fmt.Errorf("failed to write: %w", err)
+			fmt.Fprintf(w, "✅\n")
 		}
 
 		for _, card := range scoredObject.Checks {
 			r := outputHumanStep(card, verboseOutput, termWidth)
-			if _, err := io.Copy(w, r); err != nil {
-				return nil, fmt.Errorf("failed to copy output: %w", err)
+			_, err := io.Copy(w, r)
+			if err != nil {
+				return nil, err
 			}
+
 		}
 	}
 
diff --git a/score/apps/apps.go b/score/apps/apps.go
index 6624e02..c31441e 100644
--- a/score/apps/apps.go
+++ b/score/apps/apps.go
@@ -74,9 +74,9 @@ func deploymentHasAntiAffinity(deployment appsv1.Deployment) (score scorecard.Te
 		return
 	}
 
-	labels := internal.MapLabels(deployment.Spec.Template.GetObjectMeta().GetLabels())
+	lables := internal.MapLables(deployment.Spec.Template.GetObjectMeta().GetLabels())
 
-	if hasPodAntiAffinity(labels, affinity) {
+	if hasPodAntiAffinity(lables, affinity) {
 		score.Grade = scorecard.GradeAllOK
 		return
 	}
@@ -106,9 +106,9 @@ func statefulsetHasAntiAffinity(statefulset appsv1.StatefulSet) (score scorecard
 		return
 	}
 
-	labels := internal.MapLabels(statefulset.Spec.Template.GetObjectMeta().GetLabels())
+	lables := internal.MapLables(statefulset.Spec.Template.GetObjectMeta().GetLabels())
 
-	if hasPodAntiAffinity(labels, affinity) {
+	if hasPodAntiAffinity(lables, affinity) {
 		score.Grade = scorecard.GradeAllOK
 		return
 	}
@@ -117,7 +117,7 @@ func statefulsetHasAntiAffinity(statefulset appsv1.StatefulSet) (score scorecard
 	return
 }
 
-func hasPodAntiAffinity(selfLabels internal.MapLabels, affinity *corev1.Affinity) bool {
+func hasPodAntiAffinity(selfLabels internal.MapLables, affinity *corev1.Affinity) bool {
 	approvedTopologyKeys := map[string]struct{}{
 		"kubernetes.io/hostname":        {},
 		"topology.kubernetes.io/region": {},
@@ -183,7 +183,7 @@ func statefulSetSelectorLabelsMatching(statefulset appsv1.StatefulSet) (score sc
 		return
 	}
 
-	if selector.Matches(internal.MapLabels(statefulset.Spec.Template.GetObjectMeta().GetLabels())) {
+	if selector.Matches(internal.MapLables(statefulset.Spec.Template.GetObjectMeta().GetLabels())) {
 		score.Grade = scorecard.GradeAllOK
 		return
 	}
@@ -201,7 +201,7 @@ func deploymentSelectorLabelsMatching(deployment appsv1.Deployment) (score score
 		return
 	}
 
-	if selector.Matches(internal.MapLabels(deployment.Spec.Template.GetObjectMeta().GetLabels())) {
+	if selector.Matches(internal.MapLables(deployment.Spec.Template.GetObjectMeta().GetLabels())) {
 		score.Grade = scorecard.GradeAllOK
 		return
 	}
diff --git a/score/container/container.go b/score/container/container.go
index b612598..374b459 100644
--- a/score/container/container.go
+++ b/score/container/container.go
@@ -256,7 +256,6 @@ func containerStorageEphemeralRequestEqualsLimit(podTemplate corev1.PodTemplateS
 // does not prevent it from being exposed. Specifying it does not expose the port outside the cluster; that
 // requires a Service object. However misspecifying elements of this optional Container
 func containerPortsCheck(podTemplate corev1.PodTemplateSpec, typeMeta metav1.TypeMeta) (score scorecard.TestScore) {
-	const maxPortNameLength = 15
 
 	allContainers := podTemplate.Spec.InitContainers
 	allContainers = append(allContainers, podTemplate.Spec.Containers...)
@@ -274,10 +273,6 @@ func containerPortsCheck(podTemplate corev1.PodTemplateSpec, typeMeta metav1.Typ
 					score.Grade = scorecard.GradeCritical
 				}
 			}
-			if len(port.Name) > maxPortNameLength {
-				score.AddComment(container.Name, "Container Port Check", "Container port.Name length exceeds maximum permitted characters")
-				score.Grade = scorecard.GradeCritical
-			}
 			if port.ContainerPort == 0 {
 				score.AddComment(container.Name, "Container Port Check", "Container ports.containerPort cannot be empty")
 				score.Grade = scorecard.GradeCritical
diff --git a/score/disruptionbudget/disruptionbudget.go b/score/disruptionbudget/disruptionbudget.go
index 080beac..8da9a85 100644
--- a/score/disruptionbudget/disruptionbudget.go
+++ b/score/disruptionbudget/disruptionbudget.go
@@ -29,7 +29,7 @@ func hasMatching(budgets []ks.PodDisruptionBudget, namespace string, labels map[
 			return false, fmt.Errorf("failed to create selector: %w", err)
 		}
 
-		if selector.Matches(internal.MapLabels(labels)) {
+		if selector.Matches(internal.MapLables(labels)) {
 			return true, nil
 		}
 	}
diff --git a/score/internal/labelselector.go b/score/internal/labelselector.go
index 9b0ea11..ed825b3 100644
--- a/score/internal/labelselector.go
+++ b/score/internal/labelselector.go
@@ -2,15 +2,15 @@ package internal
 
 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
-// MapLabels implements the Kubernetes Labels interface
-type MapLabels map[string]string
+// MapLables implements the Kubernetes Labels interface
+type MapLables map[string]string
 
-func (l MapLabels) Has(key string) bool {
+func (l MapLables) Has(key string) bool {
 	_, ok := l[key]
 	return ok
 }
 
-func (l MapLabels) Get(key string) string {
+func (l MapLables) Get(key string) string {
 	return l[key]
 }
 
@@ -24,5 +24,5 @@ func LabelSelectorMatchesLabels(selectorLabels map[string]string, labels map[str
 		return false
 	}
 
-	return selector.Matches(MapLabels(labels))
+	return selector.Matches(MapLables(labels))
 }
diff --git a/score/networkpolicy/networkpolicy.go b/score/networkpolicy/networkpolicy.go
index fa1757f..87906e6 100644
--- a/score/networkpolicy/networkpolicy.go
+++ b/score/networkpolicy/networkpolicy.go
@@ -32,7 +32,7 @@ func podHasNetworkPolicy(allNetpols []ks.NetworkPolicy) func(spec corev1.PodTemp
 			}
 
 			if selector, err := metav1.LabelSelectorAsSelector(&netPol.Spec.PodSelector); err == nil {
-				if selector.Matches(internal.MapLabels(podSpec.Labels)) {
+				if selector.Matches(internal.MapLables(podSpec.Labels)) {
 
 					// Documentation of PolicyTypes
 					//
@@ -94,7 +94,7 @@ func networkPolicyTargetsPod(pods []ks.Pod, podspecers []ks.PodSpecer) func(netw
 			}
 
 			if selector, err := metav1.LabelSelectorAsSelector(&netpol.Spec.PodSelector); err == nil {
-				if selector.Matches(internal.MapLabels(pod.Labels)) {
+				if selector.Matches(internal.MapLables(pod.Labels)) {
 					hasMatch = true
 					break
 				}
@@ -108,7 +108,7 @@ func networkPolicyTargetsPod(pods []ks.Pod, podspecers []ks.PodSpecer) func(netw
 				}
 
 				if selector, err := metav1.LabelSelectorAsSelector(&netpol.Spec.PodSelector); err == nil {
-					if selector.Matches(internal.MapLabels(pod.GetPodTemplateSpec().Labels)) {
+					if selector.Matches(internal.MapLables(pod.GetPodTemplateSpec().Labels)) {
 						hasMatch = true
 						break
 					}
diff --git a/score/score.go b/score/score.go
index 71e0100..2cf6dad 100644
--- a/score/score.go
+++ b/score/score.go
@@ -1,9 +1,6 @@
 package score
 
 import (
-	corev1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
 	"github.com/zegl/kube-score/config"
 	ks "github.com/zegl/kube-score/domain"
 	"github.com/zegl/kube-score/score/apps"
@@ -20,6 +17,8 @@ import (
 	"github.com/zegl/kube-score/score/service"
 	"github.com/zegl/kube-score/score/stable"
 	"github.com/zegl/kube-score/scorecard"
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
 func RegisterAllChecks(allObjects ks.AllTypes, cnf config.Configuration) *checks.Checks {


Test patch:
diff --git a/parser/parse_test.go b/parser/parse_test.go
index 196dc43..758bd56 100644
--- a/parser/parse_test.go
+++ b/parser/parse_test.go
@@ -12,6 +12,7 @@ import (
 )
 
 func TestParse(t *testing.T) {
+
 	cases := []struct {
 		fname    string
 		expected error
@@ -25,13 +26,10 @@ func TestParse(t *testing.T) {
 		},
 	}
 
-	parser, err := New()
-	assert.NoError(t, err)
-
 	for _, tc := range cases {
 		fp, err := os.Open(tc.fname)
 		assert.Nil(t, err)
-		_, err = parser.ParseFiles(config.Configuration{
+		_, err = ParseFiles(config.Configuration{
 			AllFiles: []ks.NamedReader{fp},
 		})
 		if tc.expected == nil {
diff --git a/score/score_test.go b/score/score_test.go
index b2e9154..a340950 100644
--- a/score/score_test.go
+++ b/score/score_test.go
@@ -40,12 +40,7 @@ func testExpectedScoreWithConfig(t *testing.T, config config.Configuration, test
 }
 
 func testScore(config config.Configuration) (scorecard.Scorecard, error) {
-	p, err := parser.New()
-	if err != nil {
-		return nil, err
-	}
-
-	parsed, err := p.ParseFiles(config)
+	parsed, err := parser.ParseFiles(config)
 	if err != nil {
 		return nil, err
 	}
@@ -393,18 +388,6 @@ func TestPodContainerPortsDuplicateNames(t *testing.T) {
 	}, "Container Ports Check", scorecard.GradeCritical)
 }
 
-func TestPodContainerPortsNameLength(t *testing.T) {
-	t.Parallel()
-
-	structMap := make(map[string]struct{})
-	structMap["container-ports-check"] = struct{}{}
-
-	testExpectedScoreWithConfig(t, config.Configuration{
-		AllFiles:             []ks.NamedReader{testFile("pod-container-ports-name-too-long.yaml")},
-		EnabledOptionalTests: structMap,
-	}, "Container Ports Check", scorecard.GradeCritical)
-}
-
 func TestPodContainerPortsOK(t *testing.T) {
 	t.Parallel()
 
diff --git a/score/testdata/pod-container-ports-name-too-long.yaml b/score/testdata/pod-container-ports-name-too-long.yaml
deleted file mode 100644
index 0dcd401..0000000
--- a/score/testdata/pod-container-ports-name-too-long.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: app
-  labels:
-    app: app
-spec:
-  selector:
-    matchLabels:
-      app: app
-  template:
-    metadata:
-      labels:
-        app: app
-    spec:
-      nodeSelector:
-        beta.kubernetes.io/os: linux
-      containers:
-      - name: app
-        image: app:dev
-        imagePullPolicy: "Always"
-        ports:
-        - name: my-very-long-port-name-exceeds-fifteen-characters
-          containerPort: 80
-          protocol: TCP
-        - name: app 
-          containerPort: 8080
-          protocol: TCP