Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pkg/cli/audit_expanded.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ func findAwInfoPath(logsPath string) string {
return ""
}

// extractEngineConfig parses aw_info.json and returns an AuditEngineConfig
func extractEngineConfig(logsPath string) *AuditEngineConfig {
return extractEngineConfigWithInferredEngine(logsPath, "")
}

func extractEngineConfigWithInferredEngine(logsPath, inferredEngineID string) *AuditEngineConfig {
if logsPath == "" {
return nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/audit_expanded_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestExtractEngineConfig(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.expectNil && tt.awInfoContent == "" {
result := extractEngineConfig("")
result := extractEngineConfigWithInferredEngine("", "")
assert.Nil(t, result, "Should return nil for empty logs path")
Comment on lines 56 to 58
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is still named TestExtractEngineConfig, but it now directly calls extractEngineConfigWithInferredEngine (since extractEngineConfig was removed). Renaming the test (and any related subtest descriptions) would avoid confusion about which function/API is being exercised.

Copilot uses AI. Check for mistakes.
return
}
Expand All @@ -69,7 +69,7 @@ func TestExtractEngineConfig(t *testing.T) {
err := os.WriteFile(filepath.Join(targetDir, "aw_info.json"), []byte(tt.awInfoContent), 0644)
require.NoError(t, err, "Should write aw_info.json")

result := extractEngineConfig(tmpDir)
result := extractEngineConfigWithInferredEngine(tmpDir, "")
if tt.expectNil {
assert.Nil(t, result, "Should return nil")
return
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestExtractEngineConfigWithDetails(t *testing.T) {
err := os.WriteFile(filepath.Join(tmpDir, "aw_info.json"), []byte(awInfoContent), 0644)
require.NoError(t, err, "Should write aw_info.json")

result := extractEngineConfig(tmpDir)
result := extractEngineConfigWithInferredEngine(tmpDir, "")
require.NotNil(t, result, "Engine config should not be nil")
assert.Equal(t, "copilot", result.EngineID, "Engine ID should match")
assert.Equal(t, "GitHub Copilot CLI", result.EngineName, "Engine name should match")
Expand Down
Loading