fix rule "codacy.generic.sql.lookup-type-without-language-or-apps-fnd"#15
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR updates the 'codacy.generic.sql.lookup-type-without-language-or-apps-fnd' rule and bumps the Opengrep version. While Codacy results are 'up to standards', the review identified significant risks due to the absence of test files and potential logic flaws in the new regex. Specifically, the regex may fail to trigger if the 'language' keyword appears in a comment, and it lacks word boundaries for table names, which could lead to partial matches. There is also an implementation gap regarding the verification of the Opengrep version bump and the validation of SQL patterns.
About this PR
- There are no test files (e.g., test SQL files) included in the PR to verify that the new regex correctly identifies or ignores the targeted patterns.
- The PR description is empty. Please provide context for the regex modifications and why the Opengrep version bump was required.
Test suggestions
- SQL query containing 'SELECT' and 'lookup_type' but no 'language' keyword should trigger a match.
- SQL query containing 'SELECT', 'lookup_type', and 'language' keyword should NOT trigger a match.
- SQL query containing 'apps.fnd_lookup_values' should trigger a match.
- Verify Docker image builds successfully with Opengrep v1.18.0.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. SQL query containing 'SELECT' and 'lookup_type' but no 'language' keyword should trigger a match.
2. SQL query containing 'SELECT', 'lookup_type', and 'language' keyword should NOT trigger a match.
3. SQL query containing 'apps.fnd_lookup_values' should trigger a match.
4. Verify Docker image builds successfully with Opengrep v1.18.0.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
No description provided.