Skip to content

Commit f6ec2dc

Browse files
committed
Clarify path filters.
1 parent 4e1f9f9 commit f6ec2dc

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

docs/guides/initial-configuration.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ By default, CodeRabbit applies the same review instructions and contexts to all
120120

121121
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:
122122

123-
```
123+
```yaml
124124
path_instructions:
125125
- path: `src/**/*.{ts,tsx,js}`
126-
instructions:
127-
- Review the React.js, TypeScript, JavaScript code for best practices
128-
- Check for common security vulnerabilities such as:
129-
- SQL Injection
130-
- Insecure dependencies
131-
- Sensitive data exposure
126+
instructions:
127+
- Review the React.js, TypeScript, JavaScript code for best practices
128+
- Check for common security vulnerabilities such as:
129+
- SQL Injection
130+
- Insecure dependencies
131+
- Sensitive data exposure
132132
```
133133
134134
For more information, see [Path instructions](/reference/configuration#path-instructions) in the configuration reference.

docs/reference/configuration.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Each entry in this reference corresponds to a single CodeRabbit configuration se
3636
</table>
3737
</TabItem>
3838
<TabItem value="yaml" label="coderabbit.yaml">
39-
_This setting can be defined only in the web UI settings for your
40-
organization._
39+
_This setting can be defined only in the web UI settings for your
40+
organization._
4141
</TabItem>
4242
</Tabs>
4343

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

802802
You can define a list of path specifications, relative to the root of your
803-
repository, to use as path filters. These path specifications can use extended
804-
glob patterns.
803+
repository, to use as path filters.
805804

806-
If you define at least one path filter, then CodeRabbit restricts its reviews
807-
only to files whose paths meet all of the following criteria:
808-
809-
- The file must match at least one filter that doesn't begin with a leading `!` character.
810-
- The file must match none of the filters that begin with a leading `!` character.
805+
Paths can be _exclude paths_, which start with a leading `!` character, or _include
806+
paths_. If the list of paths contains at least one include path, then CodeRabbit
807+
includes _only_ files that match the provided paths.
811808

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

816-
```
813+
```bash
817814
src/**
818-
!**/*.{txt,js}
815+
!**/*.{bin,csv}
819816
```
820817

821818
:::note

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy