Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require comments on exported funcs #996

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

mboersma
Copy link
Contributor

What type of PR is this?:

/kind cleanup

What this PR does / why we need it:

Turns on golint checking for comments on exported code objects in make lint, and backfills 50+ comments to allow this PR to pass.

Also fixes some typos in the golangci-lint configuration and updates that tool to version 1.31.0.

Which issue(s) this PR fixes:

Fixes #948

Special notes for your reviewer:

This doesn't guarantee "non-trivial" comments as suggested in #948, but seems like a good start to me.

I did my best to backfill missing comments, but would love help from reviewers with more history and context to make them better.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Require comments on exported funcs

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 14, 2020
@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 14, 2020
# Run with --fast=false for more extensive checks
fast: true
issue:
issues:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The parser in golangci-lint seems to silently ignore typos like this (should have been issues:, so this section was being ignored.

max-same-issues: 0
max-per-linter: 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this should have been max-issues-per-linter--fixed now.

api/v1alpha2/types.go Outdated Show resolved Hide resolved
@mboersma mboersma force-pushed the comments-required branch 3 times, most recently from 05611ca to 3fd7335 Compare October 14, 2020 15:20
@@ -28,6 +28,7 @@ const (
// // alpha: v1.X
// MyFeature featuregate.Feature = "MyFeature"

// AKS is the feature gate for AKS managed clusters.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexeldeib is it ok to add this to the top of feature gate doc comments?

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2020
@k8s-ci-robot k8s-ci-robot merged commit 4ab94ab into kubernetes-sigs:master Oct 15, 2020
@k8s-ci-robot k8s-ci-robot added this to the v0.4.10 milestone Oct 15, 2020
@mboersma mboersma deleted the comments-required branch October 15, 2020 16:18
@mboersma mboersma mentioned this pull request Aug 16, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce documentation for public APIs
3 participants