Skip to content

TCE-1577 Disable by default all custom rules - #32

Merged
DMarinhoCodacy merged 1 commit into
mainfrom
remove-custom-rules-as-default
Jul 31, 2026
Merged

TCE-1577 Disable by default all custom rules#32
DMarinhoCodacy merged 1 commit into
mainfrom
remove-custom-rules-as-default

Conversation

@DMarinhoCodacy

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 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.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The PR implements logic to disable custom rules by default, specifically targeting those prefixed with 'codacy.'. While Codacy analysis reports the changes are up to standards, there is a critical lack of unit tests to verify the core logic modification in isEnabledByDefault. Furthermore, the definition of 'custom rules' might be incomplete as other categories like 'generic.secrets' are handled specially in this file but are not excluded by the new logic. The absence of a PR description makes it difficult to confirm the intended scope of 'custom rules'.

About this PR

  • The PR description is empty, and no unit tests were provided to verify the changes to the rule enablement logic. Documentation and tests are required to ensure the 'codacy.' prefix check correctly covers the intended scope without regressions.

Test suggestions

  • A rule with 'high' confidence and 'codacy.' prefix returns false for isEnabledByDefault.
  • A rule with 'medium' confidence and 'codacy.' prefix returns false for isEnabledByDefault.
  • A rule with 'high' confidence and no 'codacy.' prefix returns true for isEnabledByDefault.
  • A rule with 'low' confidence returns false for isEnabledByDefault.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. A rule with 'high' confidence and 'codacy.' prefix returns false for isEnabledByDefault.
2. A rule with 'medium' confidence and 'codacy.' prefix returns false for isEnabledByDefault.
3. A rule with 'high' confidence and no 'codacy.' prefix returns true for isEnabledByDefault.
4. A rule with 'low' confidence returns false for isEnabledByDefault.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread internal/docgen/parsing.go
@DMarinhoCodacy
DMarinhoCodacy merged commit ca1b2fe into main Jul 31, 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.

2 participants