No description
Find a file
Stephan Lo 19a9807499 fix: resolve all 27 golangci-lint issues with comprehensive error handling
🔧 Code Quality Improvements:
- Complete errcheck compliance (24 issues → 0)
- staticcheck optimizations (2 issues → 0)
- Unused code cleanup (1 issue → 0)
- Production-ready error handling across codebase

📦 Production Code Fixes (Priority 1):
- resp.Body.Close(): Proper defer functions with error logging
- cmd.MarkFlagRequired(): Panic on setup-critical flag errors
- viper.BindPFlag/BindEnv(): Panic on configuration binding failures
- file.Close(): Warning logs for file handling errors
- fmt.Scanln/cmd.Usage(): Graceful error handling in CLI

🧪 Test Code Fixes (Priority 2):
- w.Write(): Error checking in all HTTP mock servers
- json.NewEncoder().Encode(): Proper error handling in test helpers
- Robust test infrastructure without silent failures

 Performance & Readability (staticcheck):
- if-else chains → tagged switch statements in planner.go
- Empty branch elimination with meaningful error logging
- Import cleanup after unused function removal

🗂️ Code Organization:
- Removed unused createStreamingJSONServer helper function
- Clean imports without unused dependencies
- Consistent error handling patterns across adapters

 Quality Assurance:
- make lint: 27 issues → 0 issues
- All tests passing with robust error handling
- Production-ready error management and logging
- Enhanced code maintainability and debugging

🎯 Impact:
- Eliminates resource leaks from unclosed HTTP bodies
- Prevents silent failures in CLI setup and configuration
- Improves debugging with comprehensive error logging
- Enhances test reliability and error visibility
2025-10-08 18:55:31 +02:00
.claude feat(apply): Implement EdgeConnect configuration parsing foundation 2025-09-29 16:18:35 +02:00
.github/workflows ci: Added test workflow running on each push except tags 2025-10-07 16:10:02 +02:00
api feat(sdk): Implement EdgeXR Master Controller Go SDK foundation 2025-09-25 14:05:20 +02:00
cmd/cli feat: implement dependency injection with proper hexagonal architecture 2025-10-08 18:15:26 +02:00
internal fix: resolve all 27 golangci-lint issues with comprehensive error handling 2025-10-08 18:55:31 +02:00
sdk feat: implement dependency injection with proper hexagonal architecture 2025-10-08 18:15:26 +02:00
.envrc.example chore: Added flake 2025-10-07 14:37:54 +02:00
.gitignore chore: Added flake 2025-10-07 14:37:54 +02:00
.goreleaser.yaml fix(cli): Force usage of gitea token 2025-10-02 13:44:28 +02:00
apply-todo.md feat(apply): Implement CLI command with comprehensive deployment workflow 2025-09-29 17:24:59 +02:00
apply.md chore(cli): Removed appName from config schema. This is redundant to metadata name 2025-09-30 11:33:52 +02:00
config.yaml.example feat(cli): Implement Edge Connect CLI tool 2025-09-18 13:51:09 +02:00
devbox.json chore(): unique go version 1.25, fixes 'make test-coverage' error 2025-10-08 16:49:31 +02:00
devbox.lock chore(): unique go version 1.25, fixes 'make test-coverage' error 2025-10-08 16:49:31 +02:00
Dockerfile feat(client): add basic client, model 2025-09-16 13:02:33 +02:00
edge-connect-cli feat: implement dependency injection with proper hexagonal architecture 2025-10-08 18:15:26 +02:00
flake.lock chore: Added flake 2025-10-07 14:37:54 +02:00
flake.nix chore(): unique go version 1.25, fixes 'make test-coverage' error 2025-10-08 16:49:31 +02:00
go.mod feat(apply): Implement deployment planning with intelligent state comparison 2025-09-29 16:36:21 +02:00
go.sum feat(apply): Implement deployment planning with intelligent state comparison 2025-09-29 16:36:21 +02:00
hexagonal-architecture-proposal.md feat: implement dependency injection with proper hexagonal architecture 2025-10-08 18:15:26 +02:00
Makefile feat: implement dependency injection with proper hexagonal architecture 2025-10-08 18:15:26 +02:00
plan.md feat(apply): Implement EdgeConnect configuration parsing foundation 2025-09-29 16:18:35 +02:00