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

False-positive when dot ending sentence is after URL #12

Closed
invidian opened this issue Nov 23, 2020 · 2 comments
Closed

False-positive when dot ending sentence is after URL #12

invidian opened this issue Nov 23, 2020 · 2 comments

Comments

@invidian
Copy link

Following pieces of code triggers false positives it seems:

const (
  // KubernetesCACN is a default CN for Kubernetes CA certificate, as recommended by
  // https://kubernetes.io/docs/setup/best-practices/certificates/.
  KubernetesCACN = "kubernetes-ca"

  // KubernetesFrontProxyCACN is a default CN for Kubernetes front proxy CA certificate,
  // as recommended by https://kubernetes.io/docs/setup/best-practices/certificates/.
  KubernetesFrontProxyCACN = "kubernetes-front-proxy-ca"

  // EtcdCACN is a default CN for etcd CA certificate, as recommended by
  // the https://kubernetes.io/docs/setup/best-practices/certificates/.
  EtcdCACN = "etcd-ca"
)
$ golangci-lint run --disable-all --enable=godot --max-same-issues=0 --max-issues-per-linter=0 --build-tags integration,e2e --timeout 10m --exclude-use-default=false --sort-results ./...
pkg/pki/etcd.go:8:72: Comment should end in a period (godot)
        // EtcdCACN is a default CN for etcd CA certificate, as recommended by
                                                                              ^
pkg/pki/kubernetes.go:8:84: Comment should end in a period (godot)
        // KubernetesCACN is a default CN for Kubernetes CA certificate, as recommended by
                                                                                          ^
pkg/pki/kubernetes.go:12:88: Comment should end in a period (godot)
        // KubernetesFrontProxyCACN is a default CN for Kubernetes front proxy CA certificate,
                                                                                              ^
$ golangci-lint version
golangci-lint has version 1.33.0 built from b90551c on 2020-11-23T05:15:36Z
@richhx
Copy link

richhx commented Nov 23, 2020

+1 also seeing this

@tetafro
Copy link
Owner

tetafro commented Nov 30, 2020

Fixed in 1.3.1.
FYI, I disabled check for comments with a URL at the end. I think forcing a period at the end of the URL could be confusing

// Read more:
// http://example.com/?token=abc.123.

Not clear whether it's a part of the URL or not.

@tetafro tetafro closed this as completed Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants