Skip to content

Commit 33ccad5

Browse files
Merge pull request #2554 from JoelSpeed/update-kal
Bring KAL up to date and enable new linters
2 parents 1b67472 + 151f6df commit 33ccad5

File tree

1,250 files changed

+64896
-35164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,250 files changed

+64896
-35164
lines changed

.golangci.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ linters:
1111
settings:
1212
linters:
1313
enable:
14+
- forbiddenmarkers
1415
- maxlength
16+
- namingconventions
1517
- nobools
1618
- nomaps
1719
- statussubresource
@@ -20,6 +22,13 @@ linters:
2022
isFirstField: Warn
2123
usePatchStrategy: Ignore
2224
useProtobuf: Ignore
25+
forbiddenmarkers:
26+
markers:
27+
- identifier: "openshift:enable:FeatureSets"
28+
- identifier: "openshift:validation:FeatureSetAwareEnum"
29+
- identifier: "openshift:validation:FeatureSetAwareXValidation"
30+
- identifier: "kubebuilder:validation:UniqueItems"
31+
- identifier: "kubebuilder:validation:Pattern" # Use CEL expressions instead
2332
optionalfields:
2433
pointers:
2534
preference: WhenRequired
@@ -33,7 +42,7 @@ linters:
3342
# This will force omitzero on optional struct fields.
3443
# This means they can be omitted correctly and prevents the need for pointers to structs.
3544
policy: SuggestFix
36-
requiredFields:
45+
requiredfields:
3746
pointers:
3847
# This will force pointers when the field is required, but only when the zero
3948
# value is a valid user choice, and has a semantic difference to being omitted (e.g. replicas allows 0).
@@ -47,7 +56,18 @@ linters:
4756
# This will force omitzero on required struct fields.
4857
# This means they can be omitted correctly and prevents the need for pointers to structs.
4958
policy: SuggestFix
50-
uniqueMarkers:
59+
namingconventions:
60+
conventions:
61+
- name: norefs
62+
violationMatcher: "(?i)ref(erence)?s?$"
63+
operation: Drop
64+
message: "reference fields should not need to be named ref(s)/reference(s)"
65+
- name: nokind
66+
violationMatcher: "^Kind$"
67+
operation: Replacement
68+
replacement: "Resource"
69+
message: "API Kinds can be ambiguous and should be replaced with Resource"
70+
uniquemarkers:
5171
customMarkers:
5272
- identifier: "openshift:validation:FeatureGateAwareEnum"
5373
attributes:

tools/go.mod

Lines changed: 94 additions & 87 deletions
Large diffs are not rendered by default.

tools/go.sum

Lines changed: 209 additions & 283 deletions
Large diffs are not rendered by default.

tools/vendor/cloud.google.com/go/auth/CHANGES.md

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/vendor/cloud.google.com/go/auth/auth.go

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/externalaccount.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/x509_provider.go

Lines changed: 165 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)