Skip to content

Add new configuration guides and reference material. #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify path filters.
  • Loading branch information
jmacdotorg committed Jun 19, 2025
commit f6ec2dc44e8b10e88f33a0371c5398c138e8fe5b
14 changes: 7 additions & 7 deletions docs/guides/initial-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ By default, CodeRabbit applies the same review instructions and contexts to all

Each path instruction specifies a path specification and a set of instructions, the latter of which you express using natural language. For example, you can add a section like this to your repository's `coderabbit.yaml` file:

```
```yaml
path_instructions:
- path: `src/**/*.{ts,tsx,js}`
instructions:
- Review the React.js, TypeScript, JavaScript code for best practices
- Check for common security vulnerabilities such as:
- SQL Injection
- Insecure dependencies
- Sensitive data exposure
instructions:
- Review the React.js, TypeScript, JavaScript code for best practices
- Check for common security vulnerabilities such as:
- SQL Injection
- Insecure dependencies
- Sensitive data exposure
```

For more information, see [Path instructions](/reference/configuration#path-instructions) in the configuration reference.
Expand Down
21 changes: 9 additions & 12 deletions docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Each entry in this reference corresponds to a single CodeRabbit configuration se
</table>
</TabItem>
<TabItem value="yaml" label="coderabbit.yaml">
_This setting can be defined only in the web UI settings for your
organization._
_This setting can be defined only in the web UI settings for your
organization._
</TabItem>
</Tabs>

Expand Down Expand Up @@ -800,22 +800,19 @@ Path filters, if defined, restrict the portions of your repository that CodeRabb
uses for context when preparing code reviews.

You can define a list of path specifications, relative to the root of your
repository, to use as path filters. These path specifications can use extended
glob patterns.
repository, to use as path filters.

If you define at least one path filter, then CodeRabbit restricts its reviews
only to files whose paths meet all of the following criteria:

- The file must match at least one filter that doesn't begin with a leading `!` character.
- The file must match none of the filters that begin with a leading `!` character.
Paths can be _exclude paths_, which start with a leading `!` character, or _include
paths_. If the list of paths contains at least one include path, then CodeRabbit
includes _only_ files that match the provided paths.

For example, the following list of path filters instructs CodeRabbit to limit its reviews
only to files found in the `src` top-level directory, but exclude any `.txt` or `.js`
only to files found in the `src` top-level directory, but exclude any `.bin` or `.csv`
files:

```
```bash
src/**
!**/*.{txt,js}
!**/*.{bin,csv}
```

:::note
Expand Down
Loading