Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

hack: include scripts for golint, gofmt, spelling, shellcheck, etc. #21

Merged
merged 6 commits into from
Jun 25, 2019

Conversation

neolit123
Copy link
Contributor

was #13, but i managed to corrupt the branch and the PR cannot be re-opened.
now also includes a commit for boilerplate checks.

WRT to presubmit PR verification:
xref #5
fixes #18

for kinder we have this that uses prow's pod-utils:
https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes/kubeadm/kubeadm-presubmits.yaml

similar can be done for kubernetes-sigs/cluster-api-provider-docker/presubmits.yaml

/kind feature
/priority important-soon
/assign @chuckha

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 25, 2019
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 25, 2019
update:
- deps: calls go mod tidy

verify:
- build: calls build for ./cmd
- deps: verifies if the current go.* files are valid
- gotest: calls go tests on _test files if present
- govet: calls go vet
- shellcheck: executes shellcheck on all .sh files
Currently supports .go, .py and .sh files.
Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

Code looks legit.

One question, where does this code come from? Is there a repo where you're pulling this from or is it copy-pasta tribal knowledge?

@neolit123
Copy link
Contributor Author

One question, where does this code come from? Is there a repo where you're pulling this from or is it copy-pasta tribal knowledge?

  • kinder for the bash script, some based on kind previously.
  • boilerplate written today.

@chuckha
Copy link
Contributor

chuckha commented Jun 25, 2019

I wonder if there's some way we could share these across similar applications 🤔 oh well, out of scope for this issue.

/approve

Thank you so much for this work 🙏

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha, neolit123

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 Jun 25, 2019
@detiber
Copy link
Contributor

detiber commented Jun 25, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2019
@k8s-ci-robot k8s-ci-robot merged commit b2324ba into kubernetes-retired:master Jun 25, 2019
@neolit123
Copy link
Contributor Author

neolit123 commented Jun 25, 2019

I wonder if there's some way we could share these across similar applications thinking oh well, out of scope for this issue.

i though about that. instead of booking a standalone repo for we can technically have them hosted somewhere (e.g. under kubeadm) and a local, per-project script can wget them and run them on demand.

problems are:

  • that most of the scripts need customization as the repos have different demands.
  • does not provide, non-air gapped, self contained local verification for developers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add boiler plate check written in go
4 participants