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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 enable godot on top-level comments #5591

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented Nov 5, 2021

What this PR does / why we need it:

Goal of the PR in its current state is to discuss if we want to enable godot also on toplevel comments (default is declarations).

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 #

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 5, 2021
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 5, 2021
Copy link
Member Author

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

I think capitalization linting doesn't make sense as it has too many false positives.

The actual "trailing dot" part looks fine to me.

I would enable toplevel "trailing dot" linting but not capitalization.

    #   declarations - for top level declaration comments (default);
    #   toplevel     - for top level comments;
    #   all          - for all comments.
    scope: toplevel
    exclude:
    - '^ \+.*'
    - '^ ANCHOR.*'

WDYT?

P.S. We can test in a follow-up PR if all is an option (trailing dot findings: top-level : 32, all: 1950).

bootstrap/kubeadm/internal/cloudinit/cloudinit.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/upgrader.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/repository/client.go Outdated Show resolved Hide resolved
hack/boilerplate/test/fail.go Outdated Show resolved Hide resolved
@fabriziopandini
Copy link
Member

This goes in the direction of more consistency across the code base, so I'm +1

Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

I agree the punctuation is more useful than the capitalization.

It's probably OK to enable "all", but the only concern I would have with that is it's not obvious to new developers coming in that the linting will flag comments starting with the name of a privately scoped variable (lowercase) as an issue, so it could cause some frustration when linting checks fail. Not a huge deal, but something to consider.

hack/boilerplate/test/fail.go Outdated Show resolved Hide resolved
.golangci.yml Outdated
exclude:
- '^ \+.*'
- '^ ANCHOR.*'
capital: true
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this? It seems flaky imo and lots of friction. The benefit of having a capital letter after a dot is small compared to a smoother new contributor experience

Copy link
Member Author

@sbueringer sbueringer Nov 8, 2021

Choose a reason for hiding this comment

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

I would drop capitalization as stated in: #5591 (review)

Just wanted to wait for additional opinions.

Just didn't want to directly fix it to visualize how bad it is :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 8, 2021
@sbueringer
Copy link
Member Author

Dropped capitalization.

@sbueringer sbueringer changed the title [WIP] 馃尡 enable godot on top-level comments 馃尡 enable godot on top-level comments Nov 8, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2021
@fabriziopandini
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 8, 2021
@killianmuldoon
Copy link
Contributor

/lgtm

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 Nov 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 567527a into kubernetes-sigs:main Nov 8, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 8, 2021
@sbueringer sbueringer deleted the pr-godot-toplevel branch November 8, 2021 19:07
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants