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

improve linter quality for external-dns #1618

Merged
merged 3 commits into from
Jun 8, 2020

Conversation

njuettner
Copy link
Member

Towards #1555

It seems me missed quite a lot of good linters. I added more and there were also a lot of minor nits inside the code which I've fixed.

The goal here would be to improve in general our code quality. It make sense for the future to even add more linters but I think this is a good starting point.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner

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 6, 2020
@njuettner
Copy link
Member Author

@szuecs thanks for the suggestion of adding staticcheck. If something is missing, let me know.

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: _test\.go
Copy link
Member

Choose a reason for hiding this comment

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

@njuettner do we really want to disable all checks for the test code? Usually I prefer to think about test code to be equally important to production one.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree we should not, however I would rather start with this approach and then as soon as possible add the linter for test files. The only problem which I faced was it is simply impossible to fix it within 2 hours. There were so many complaints in the test files which was too much to handle.

I would like to merge it because I want to have a linter which also checks if code it not used.

Copy link
Member

Choose a reason for hiding this comment

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

got it, cool. I've created #1621 to handle it later

@ytsarev
Copy link
Member

ytsarev commented Jun 8, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 8, 2020
@k8s-ci-robot k8s-ci-robot merged commit 03df687 into kubernetes-sigs:master Jun 8, 2020
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/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.

None yet

6 participants