Skip to content

Commit a720cb7

Browse files
hasittyaga001
authored andcommitted
Update YAML settings in configure-coderabbit.md (#40)
* Update YAML settings in configure-coderabbit.md * Add configuration for `languagetool` integration in configure-coderabbit.md
1 parent 9f11153 commit a720cb7

File tree

1 file changed

+51
-14
lines changed

1 file changed

+51
-14
lines changed

docs/guides/configure-coderabbit.md

+51-14
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ YAML settings:
6565
(default:`false`).
6666
- **`path_filters`**: Specifies file patterns to exclude or include for a
6767
review, such as `!dist/**` and `src/**.tsx`, using glob notation. Example:
68+
6869
```yaml
6970
path_filters:
7071
- !**/*.xml
7172
- !**/generated/**
7273
```
74+
7375
- **`path_instructions`**: Provides specific additional guidelines for code
7476
review based on file paths. In the given example, JavaScript files are
7577
singled out for checks against the Google JavaScript style guide. File path
@@ -99,11 +101,13 @@ YAML settings:
99101
(default: `true`).
100102
- **`base_branches`**: A list of base branches for which the reviews will
101103
trigger, apart from the default branch. Accepts regex pattern. Example:
102-
```yaml
103-
base_branches:
104-
- "develop"
105-
- "feat/.*"
106-
```
104+
105+
```yaml
106+
base_branches:
107+
- "develop"
108+
- "feat/.*"
109+
```
110+
107111
- **`tools`**: Configurations for the tools used in the review.
108112
- **`ast-grep`**: Configurations for the `ast-grep` tool.
109113
- **`rule_dirs`**: The directory name where the custom `ast-grep` rules
@@ -112,16 +116,49 @@ YAML settings:
112116
are stored.
113117
- **`packages`**: A package allows you to share rules across multiple
114118
projects. Essentially, a package is a collection of `ast-grep` rules.
115-
Example:
119+
- **`github-checks`**: Configuration for GitHub Checks integration.
120+
- **`enabled`**: Enable integration, defaults to true.
121+
- **`timeout_ms`**: Time in milliseconds to wait for all GitHub Checks to conclude, defaults to 90000 (1.5 minutes), maximum is 300000 (5 minutes), minimum is 0 (no timeout).
122+
- **`markdownlint`**: Configuration for `markdownlint` integration.
123+
- **`enabled`**: Enable integration, defaults to true.
124+
- **`ruff`**: Configuration for `ruff` integration.
125+
- **`enabled`**: Enable integration, defaults to true.
126+
- **`shellcheck`**: Configuration for `shellcheck` integration.
127+
- **`enabled`**: Enable integration, defaults to true.
128+
- **`languagetool`**: Configuration for `languagetool` integration.
129+
- **`enabled`**: Enable integration, defaults to true.
130+
- **`level`**: The level of the rule. Can be one `default` or `picky`. If set to `picky`, additional rules will be activated, i.e. rules that you might only find useful when checking formal text.
131+
- **`enabled_rules`**: IDs of rules to be enabled. The rule won't run unless 'level' is set to a level that activates the rule.
132+
- **`disabled_rules`**: IDs of rules to be disabled.
133+
- **`enabled_categories`**: IDs of categories to be enabled.
134+
- **`disabled_categories`**: IDs of categories to be disabled.
135+
- **`enabled_only`**: Only the rules and categories whose IDs are specified with `enabled_rules` or `enabled_categories` are enabled.
136+
116137
```yaml
117-
ast-grep:
118-
rule_dirs:
119-
- "rules"
120-
util_dirs:
121-
- "utils"
122-
packages:
123-
- "ast-grep-essentials"
124-
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
138+
ast-grep:
139+
rule_dirs:
140+
- "rules"
141+
util_dirs:
142+
- "utils"
143+
packages:
144+
- "ast-grep-essentials"
145+
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
146+
github-checks:
147+
enabled: true
148+
timeout_ms: 90000
149+
markdownlint:
150+
enabled: true
151+
ruff:
152+
enabled: true
153+
shellcheck:
154+
enabled: true
155+
languagetool:
156+
enabled: true
157+
enabled_only: false
158+
level: default
159+
enabled_categories:
160+
- "TON_ACADEMIC"
161+
- "CASING"
125162
```
126163

127164
5. **`chat`**: Defines the behavior of CodeRabbit's bot in conversations.

0 commit comments

Comments
 (0)