Skip to content

fix rule "codacy.generic.sql.lookup-type-without-language-or-apps-fnd"#15

Merged
DMarinhoCodacy merged 3 commits into
mainfrom
fix-lookup_type-rule
May 11, 2026
Merged

fix rule "codacy.generic.sql.lookup-type-without-language-or-apps-fnd"#15
DMarinhoCodacy merged 3 commits into
mainfrom
fix-lookup_type-rule

Conversation

@DMarinhoCodacy
Copy link
Copy Markdown
Contributor

No description provided.

@DMarinhoCodacy DMarinhoCodacy changed the title fix codacy.generic.sql.lookup-type-without-language-or-apps-fnd fix rule "codacy.generic.sql.lookup-type-without-language-or-apps-fnd" May 11, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 11, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@codacy-production codacy-production Bot 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 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

Comment thread docs/codacy-rules.yaml Outdated
Comment thread docs/codacy-rules.yaml Outdated
Comment thread docs/codacy-rules.yaml Outdated
@heliocodacy heliocodacy self-requested a review May 11, 2026 15:28
@DMarinhoCodacy DMarinhoCodacy merged commit 97cff78 into main May 11, 2026
3 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.

2 participants