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

Add importas linting configuration to enforce common package import naming #2715

Conversation

timflannagan
Copy link
Contributor

Description of the change:
Introduce a configuration for the importas configuration for commonly used package imports, e.g. metav1/corev1/appsv1, when running golangci-lint runner. This is currently used in the operator-framework/rukpak repository, and helps lessen reviewer burden as we're focusing less on styling differences.

Motivation for the change:
Enforce package import naming for commonly imported packages to lessen the reviewer burden.

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky
  • Tests that remove the [FLAKE] tag are no longer flaky

@openshift-ci
Copy link

openshift-ci bot commented Mar 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: timflannagan

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2022
@timflannagan
Copy link
Contributor Author

Unit test failures are reproducible locally.

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 28, 2022
@timflannagan timflannagan force-pushed the ci/add-importas-linter-configuration branch from fb468c8 to eddc31e Compare March 28, 2022 20:05
@timflannagan
Copy link
Contributor Author

Fixed the unit test failures in my last force push.

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 28, 2022
@timflannagan timflannagan force-pushed the ci/add-importas-linter-configuration branch 2 times, most recently from ba1dc4a to fc5e71c Compare March 29, 2022 13:16
…aming

Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
@timflannagan timflannagan force-pushed the ci/add-importas-linter-configuration branch from fc5e71c to 25e1546 Compare March 29, 2022 16:05
@perdasilva
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2022
@openshift-merge-robot openshift-merge-robot merged commit 2194336 into operator-framework:master Mar 29, 2022
@timflannagan timflannagan deleted the ci/add-importas-linter-configuration branch March 29, 2022 16:38
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants