Skip to content

Increase Tool Timeout#3

Merged
DMarinhoCodacy merged 2 commits intomainfrom
increase-tool-timeout
Feb 27, 2026
Merged

Increase Tool Timeout#3
DMarinhoCodacy merged 2 commits intomainfrom
increase-tool-timeout

Conversation

@heliocodacy
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 26, 2026 17:04
@codacy-production
Copy link

codacy-production bot commented Feb 26, 2026

Codacy's Analysis Summary

0 new issue (≤ 0 minor issue)
0 new security issue
0 complexity
0 duplications
More details

AI Reviewer: run the reviewer on demand. As new changes are pushed, run a review below.
To trigger the first review automatically, go to your organization or repository integration settings.
AI can make mistakes. Always validate suggestions.

 
  Run Reviewer ▶︎  
 

Copy link

Copilot AI left a 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 increases the timeout parameter for the opengrep scan command from 5 seconds to 15 seconds. The change is made in the command parameter construction to allow the analysis tool more time to complete before timing out, which is likely addressing issues with larger files or more complex analysis patterns.

Changes:

  • Increased --timeout parameter from "5" to "15" in the opengrep command configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"--config", configurationFile.Name(),
/// "-l", language,
"--timeout", "5",
"--timeout", "15",
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The timeout value has been updated to "15" in the production code, but the test file internal/tool/command_test.go at line 47 still expects the old value of "5". This will cause the test TestCreateCommandParameters to fail since it asserts that the command parameters should include "--timeout", "5".

Suggested change
"--timeout", "15",
"--timeout", "5",

Copilot uses AI. Check for mistakes.
"--config", configurationFile.Name(),
/// "-l", language,
"--timeout", "5",
"--timeout", "15",
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This timeout value is hardcoded as a string literal. Consider extracting this and other command parameter values (like timeout-threshold "3", max-memory "2560") as named constants at the package level, following the pattern used elsewhere in the codebase (see internal/tool/configuration.go lines 19 and 22 which define constants for configuration file names). This would make the values easier to maintain, update, and document, especially since the timeout value appears both here and in tests.

Copilot uses AI. Check for mistakes.
@DanielOrge DanielOrge requested review from DanielOrge and stefanvacareanu7 and removed request for DanielOrge February 27, 2026 11:44
@DMarinhoCodacy DMarinhoCodacy merged commit b6cb8e5 into main Feb 27, 2026
7 checks passed
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.

4 participants