Skip to content

[improvement] enable the optionalorrequired linter for the various APIs#841

Merged
eljohnson92 merged 1 commit intomainfrom
kal_optional_or_required
Aug 27, 2025
Merged

[improvement] enable the optionalorrequired linter for the various APIs#841
eljohnson92 merged 1 commit intomainfrom
kal_optional_or_required

Conversation

@eljohnson92
Copy link
Collaborator

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@codecov
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.65%. Comparing base (8228fc4) to head (2e9705c).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #841   +/-   ##
=======================================
  Coverage   63.65%   63.65%           
=======================================
  Files          71       71           
  Lines        7827     7827           
=======================================
  Hits         4982     4982           
  Misses       2555     2555           
  Partials      290      290           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

type FirewallRuleList struct {
metav1.TypeMeta `json:",inline"`
// metadata is the standard object's metadata.
// +optional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing optional below for Items? But also, wouldn't Items for all the *List structs be required since we don't have omitempty?

// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// spec is the desired state of the AddressSet
// +required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably only want required if omitempty isn't present.

@eljohnson92 eljohnson92 merged commit 4a56243 into main Aug 27, 2025
16 checks passed
@AshleyDumaine AshleyDumaine deleted the kal_optional_or_required branch September 9, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants