Skip to content

Fix linting errors and test failures#5743

Merged
pelikhan merged 5 commits intomainfrom
copilot/format-lint-fix-tests-another-one
Dec 7, 2025
Merged

Fix linting errors and test failures#5743
pelikhan merged 5 commits intomainfrom
copilot/format-lint-fix-tests-another-one

Conversation

Copy link
Contributor

Copilot AI commented Dec 7, 2025

Resolves linting errors in safe_inputs.go and fixes failing unit tests in workflow compilation.

Changes

Linting fixes

  • safe_inputs.go: Removed empty blocks after fmt.Sscanf calls, explicitly discarding return values to satisfy empty-block and errcheck rules

Action pins

  • actions/create-github-app-token@v2: Updated SHA to match current v2 tag (7e473efe → 29824e69)

Test fixes

  • step_summary_test.go: Handle empty model values using environment variable expressions instead of literal strings
  • threat_detection_test.go: Support both hardcoded model values and environment variable references in detection jobs
  • mcp_inspect_playwright_live_integration_test.go: Renamed test helper findAvailablePort() to findAvailableTestPort() to avoid collision with production function
// Before: violated empty-block rule
if timeoutInt, err := fmt.Sscanf(t, "%d", &toolConfig.Timeout); err == nil && timeoutInt == 1 {
    // Successfully parsed
}

// After: explicit discard
_, _ = fmt.Sscanf(t, "%d", &toolConfig.Timeout)
Original prompt

Format, lint, fix tests


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 7, 2025 13:12
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Format code, lint files, and fix tests Fix linting errors and test failures Dec 7, 2025
Copilot AI requested a review from pelikhan December 7, 2025 13:47
@pelikhan pelikhan marked this pull request as ready for review December 7, 2025 13:56
@pelikhan pelikhan merged commit b6b16f7 into main Dec 7, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/format-lint-fix-tests-another-one branch December 7, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants