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

logcheck: support new golangci-lint plugin interface #22

Closed
wants to merge 1 commit into from

Conversation

linxiulei
Copy link

The new plugin interface was added in golangci/golangci-lint#3887 to allow settings for custom plugins. This commit implements the new plugin interface with config value in the settings, and passes it to flag --config.

The new plugin interface was added in golangci/golangci-lint#3887
to allow settings for custom plugins. This commit implements the new
plugin interface with `config` value in the settings, and passes it
to flag `--config`.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: linxiulei
Once this PR has been reviewed and has the lgtm label, please assign serathius for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 30, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If logtools contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 30, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @linxiulei!

It looks like this is your first PR to kubernetes-sigs/logtools 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/logtools has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 30, 2023
@pohly
Copy link
Contributor

pohly commented Aug 1, 2023

I already added such support in #18.

The problem with the approach in this PR is that changes in the content of the config file do not invalidate the golangci-lint cache because golangci-lint is unaware that the config changed. Do you agree that my approach is better?

@linxiulei
Copy link
Author

I already added such support in #18.

Oh, I didn't find that. I am fine to discard this one if that one is better.

The problem with the approach in this PR is that changes in the content of the config file do not invalidate the golangci-lint cache because golangci-lint is unaware that the config changed. Do you agree that my approach is better?

Would golangci-lint invalidate the cache if the settings have changed?

Would having a separate config file be preferable if the content of the config file is verbose?

@pohly
Copy link
Contributor

pohly commented Aug 1, 2023

Would golangci-lint invalidate the cache if the settings have changed?

Yes.

Would having a separate config file be preferable if the content of the config file is verbose?

An #include feature in golangci-lint would be nice, but doesn't exist and is close to impossible to add. In kubernetes/kubernetes#118502 I am using templating to include the config file.

@pohly
Copy link
Contributor

pohly commented Aug 8, 2023

/close

In favor of #18

@k8s-ci-robot
Copy link
Contributor

@pohly: Closed this PR.

In response to this:

/close

In favor of #18

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants