-
Notifications
You must be signed in to change notification settings - Fork 10
chore: add github workflow & golang linting #2
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a CI workflow for the project, including Go linting and test coverage reporting.
- Added a GitHub Actions configuration file for continuous integration
- Defined two jobs: one for linting with golangci-lint and one for running tests with coverage reporting
Files not reviewed (1)
- .golangci-lint: Language not supported
736c8a7 to
61f2504
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a GitHub workflow for backend CI including Go linting and test coverage, and improves error handling across various test and service files.
- Improved error checking and handling in multipart file writes and JSON unmarshalling in HTTP tests
- Added error handling for page creation, file writes, and random byte generation in core services
- Introduced a new GitHub Actions workflow for CI and linting
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/http/router_test.go | Added error checks for multipart file writes and JSON unmarshalling in tests |
| internal/core/tree/tree_service_test.go | Enhanced error handling for page creation and file writes in tests |
| internal/core/tree/page_store.go | Refactored variable declarations in MovePage for clarity and safety |
| internal/core/auth/auth_service.go | Introduced error checks for rand.Read in token generation |
| internal/core/assets/assets_service_test.go | Added error handling for directory and file operations in asset tests |
| .github/workflows/backend.yml | Added new CI workflow for Go linting, testing, and coverage reporting |
Files not reviewed (1)
- .golangci-lint: Language not supported
Comments suppressed due to low confidence (1)
internal/core/auth/auth_service.go:99
- Returning an empty string when rand.Read fails may lead to silent token generation issues. Consider propagating the error or handling the failure more explicitly to avoid potential security concerns.
if (_, err := rand.Read(b); err != nil) {
4781cc1 to
b2a80f1
Compare
No description provided.