Skip to content

Commit

Permalink
Coderabbit config update (#7260)
Browse files Browse the repository at this point in the history
* update coderabbit config to reduce the try/catch suggestions

* disable auto-increment reviews

* fix auto_Review placement

* enable the auto_incremental_reviews as the rabbit suggested it

* use code-guidelines.md instruction

* non-null assertion w example rule

* path fix
  • Loading branch information
bobbykolev authored Nov 28, 2024
1 parent 9235a46 commit 23fac77
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ reviews:
review_status: true
collapse_walkthrough: false
changed_files_summary: true
auto_review:
enabled: true
auto_incremental_review: true
path_filters:
- "!**/.github/**"
- "!**/node_modules/**" # Exclude dependencies
Expand All @@ -15,7 +18,26 @@ reviews:
instructions: |
Review the React.js/TypeScript/JavaScript code for best practices and potential bugs.
Ensure that the code adheres to TypeScript's typing system and modern standards.
Ensure sufficient error handling and logging is present.
Use the following code guide documentation in the codebase: 'docs/code-guidelines.md'.
Ensure sufficient error handling and logging is present, **but note:**
- Local `try/catch` blocks are not required unless they provide value
beyond what the global error handler already covers.
- Avoid flagging the absence of local error handling in cases where the
global error handler suffices.
- Avoid flagging the absence of logging in cases where the global logger is
already in place (graphql usage).
Inform about the recommendation of not using non-null assertion,
except on GraphQL queries where the variable is asserted non-null and followed by a
`skip:` with the same variable.
Examples:
- Not Required: there's a skip
{
variables: { templateId: templateId! },
skip: !templateId,
}
Check for common security vulnerabilities such as:
- SQL Injection
- XSS (Cross-Site Scripting)
Expand Down

0 comments on commit 23fac77

Please sign in to comment.