Skip to content

Commit 05687a8

Browse files
committed
fix(ci): resolve 4 simple code quality issues (Round 1)
Applying minimal fixes following fix-ci-loop methodology: 1. Dependency Review Workflow: - Fixed: Cannot use both allow-licenses and deny-licenses - Removed allow-licenses parameter - Kept deny-licenses for GPL/AGPL restrictions 2. pkg/security/validation_test.go:666: - Fixed: undefined: strings - Added missing "strings" import 3. pkg/websocket/server.go:123: - Fixed: Context cancel function not used on all paths - Added defer cancel() after context creation 4. examples/claude_cli_demo.go:24: - Fixed: fmt.Println arg list ends with redundant newline - Replaced "\n" in string with explicit fmt.Println() Files Modified: - .github/workflows/dependency-review.yml - examples/claude_cli_demo.go - pkg/security/validation_test.go - pkg/websocket/server.go Expected Impact: - Dependency Review workflow should now pass - 4 go vet errors resolved - Remaining: ~17 errors (mostly in tn/manager and adapters/vnf-operator) Next Round: Will address test redeclarations and undefined methods
1 parent df1b6f9 commit 05687a8

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ jobs:
4242
fail-on-severity: critical
4343
# Comment on PR with results
4444
comment-summary-in-pr: true
45-
# Deny specific licenses
45+
# Deny specific licenses (cannot use both allow and deny)
4646
deny-licenses: GPL-2.0, GPL-3.0, AGPL-1.0, AGPL-3.0
4747
# Allow all other vulnerabilities but warn
4848
warn-only: true
49-
# Allow specific licenses
50-
allow-licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC
5149
# Enable vulnerability database check
5250
vulnerability-check: true
5351
# Enable license check

examples/claude_cli_demo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ func main() {
2121
ctx := context.Background()
2222

2323
fmt.Println("🚀 O-RAN Network Slicing with Claude CLI Integration")
24-
fmt.Println("====================================================\n")
24+
fmt.Println("====================================================")
25+
fmt.Println() // Add blank line explicitly
2526

2627
// Create Claude client with tmux integration
2728
config := &claude.ClientConfig{

pkg/security/validation_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88
"os"
99
"runtime"
10+
"strings"
1011
"sync"
1112
"testing"
1213
"time"

pkg/websocket/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ func (s *Server) handleWebSocket(w http.ResponseWriter, r *http.Request) {
121121
// Create new session
122122
sessionID := uuid.New().String()
123123
ctx, cancel := context.WithCancel(context.Background())
124+
defer cancel() // Ensure cancel is called on all paths
124125

125126
// Create Claude client for this session
126127
claudeConfig := &claude.ClientConfig{

0 commit comments

Comments
 (0)