feat(repo): adding the editor config#53
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a standardized code formatting approach via a new .editorconfig file and reorganizes import statements across multiple files to improve clarity and consistency.
- Added .editorconfig to enforce coding styles.
- Reorganized internal and external package imports in several Go files for better readability.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vault.go | Moved "github.com/spf13/viper" import to the proper grouping and removed duplicate entry. |
| options.go | Reordered internal package imports into a new grouping following external packages. |
| cache/service_endpoint_hash_bucket_test.go | Re-added the "github.com/jacobbrewer1/web/slices" import in accordance with the new structure. |
| cache/service_endpoint_hash_bucket.go | Adjusted logging and slices import positions to match the project's reorganization. |
| app_test.go | Moved the logging import to maintain alphabetical order. |
| app.go | Removed the original internal imports block and re-added them later in the file to ensure consistent ordering. |
Files not reviewed (1)
- .editorconfig: Language not supported
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an .editorconfig file to standardize code formatting across the project and reorganizes import statements in multiple files to improve readability and consistency.
- Added an .editorconfig file with rules for indentation, line endings, encoding, etc.
- Reorganized import statements across several files to group and order dependencies more clearly.
- Updated .golangci.yaml to enable gofmt simplification for cleaner formatting.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vault.go | Moved the viper import to the proper section and removed its duplicate entry. |
| options.go | Reorganized internal package imports into a new grouped section. |
| cache/service_endpoint_hash_bucket_test.go | Adjusted the placement of the slices package import for grouping consistency. |
| cache/service_endpoint_hash_bucket.go | Reordered logging and slices imports to a new consistent section. |
| app_test.go | Adjusted logging import to maintain alphabetical order. |
| app.go | Reorganized internal package imports into a new grouped section for clarity. |
| .golangci.yaml | Updated gofmt settings to enable simplification. |
Files not reviewed (1)
- .editorconfig: Language not supported
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Describe your changes
This pull request introduces an
.editorconfigfile to standardize code formatting across the project and reorganizes import statements in multiple files to improve readability and maintain consistency. The most significant changes are outlined below:Code Formatting Standardization:
.editorconfigfile to enforce consistent coding styles, including settings for character encoding, line endings, indentation, and maximum line length. Specific overrides were added for Bash, Go, YAML, and other file types.Import Statement Reorganization:
app.go: Reorganized import statements to group related dependencies together, moving several internal packages (goredis,uhttp,vaulty, etc.) to a separate section for better clarity. [1] [2]app_test.go: Adjusted the placement of theloggingpackage import to maintain alphabetical order.cache/service_endpoint_hash_bucket.go: Re-added imports forloggingandslicesin a new section to align with the import structure.cache/service_endpoint_hash_bucket_test.go: Re-added theslicespackage import in a separate section to improve organization.vault.go: Moved theviperpackage import to its correct alphabetical position.