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

chore: establish and enforce a convention for import paths #211

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

sergiught
Copy link
Contributor

Description

The main focus of this PR is to establish and enforce a convention for grouping import paths. This is easily achieved by introducing an extra check within the golangci-lint config that will:

  • Move all imports into a single declaration
  • Groups stdlib imports
  • Groups 3rd party pkg imports
  • Groups current project imports

Why?

Grouping import paths is important for several reasons:

  • Improved readability
  • Makes the code more predictable
  • Easier to identify and manage dependencies
  • Reduce cognitive load

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Makefile Show resolved Hide resolved
@sergiught sergiught marked this pull request as ready for review January 5, 2024 09:09
@sergiught sergiught requested a review from a team as a code owner January 5, 2024 09:09
@rhamzeh rhamzeh enabled auto-merge January 5, 2024 13:00
@rhamzeh rhamzeh disabled auto-merge January 5, 2024 13:06
@sergiught sergiught added this pull request to the merge queue Jan 5, 2024
Merged via the queue into main with commit 655a166 Jan 5, 2024
12 checks passed
@sergiught sergiught deleted the lint/goimports branch January 5, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants