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

Linting should catch exported values without docstrings #64

Closed
bobcatfish opened this issue Aug 16, 2019 · 10 comments
Closed

Linting should catch exported values without docstrings #64

bobcatfish opened this issue Aug 16, 2019 · 10 comments
Labels
area/test-infra Issues or PRs related to the testing infrastructure kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@bobcatfish
Copy link
Contributor

Expected Behavior

If someone opens a PR with exported values that don't have docstrings, linting should prompt them to add a docstring.

Actual Behavior

Nothing happens! e.g. in tektoncd/triggers#63

Steps to Reproduce the Problem

  1. Add a new type to a _types.go in the triggers repo or pipeline repo, e.g.
type SomeNewThing struct {
	TriggerBinding     TriggerBindingRef  `json:"triggerBinding"`
	TriggerTemplate    TriggerTemplateRef `json:"triggerTemplate"`
	ServiceAccountName string             `json:"serviceAccountName"`
}
  1. Open a PR
  2. Note that the linting doesnt say anything! But actually if you opened this in an editor (e.g. vscode with the Go plugin) you'd get a warning that there should be docstrings for SomeNewThing and its attributes

Additional Info

From @vtereso :

Adding `-E golint` to our lint command (`golangci-lint run`) _should_ allow us to get [this behavior](https://github.com/golang/lint/blob/master/lint.go), but when I tried it only complained about naming stutter errors. 

(Those stutter errors are probably decent to surface as well imo! Why not :D )

@vdemeester
Copy link
Member

@bobcatfish yeah, we should add this to the linter in the golangci configuration file. Right now, each repository has its own (see tektoncd/cli or tektoncd/triggers), we could have a default one, shared by all maybe ?

@vdemeester vdemeester added area/test-infra Issues or PRs related to the testing infrastructure kind/feature Categorizes issue or PR as related to a new feature. labels Dec 13, 2019
@tekton-robot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 13, 2020
@tekton-robot
Copy link
Contributor

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@bobcatfish
Copy link
Contributor Author

Feels like something we should do, if we haven't already?
/remove-lifecycle stale.

@bobcatfish bobcatfish reopened this Aug 13, 2020
@bobcatfish
Copy link
Contributor Author

dang it

/remove-lifecycle stale

@tekton-robot tekton-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 13, 2020
@bobcatfish
Copy link
Contributor Author

SHOOT

@bobcatfish bobcatfish reopened this Aug 13, 2020
@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-infra Issues or PRs related to the testing infrastructure kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants