Skip to content
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

Update YAML settings in configure-coderabbit.md #40

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Changes from all commits
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
65 changes: 51 additions & 14 deletions docs/guides/configure-coderabbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ YAML settings:
(default:`false`).
- **`path_filters`**: Specifies file patterns to exclude or include for a
review, such as `!dist/**` and `src/**.tsx`, using glob notation. Example:

```yaml
path_filters:
- !**/*.xml
- !**/generated/**
```

- **`path_instructions`**: Provides specific additional guidelines for code
review based on file paths. In the given example, JavaScript files are
singled out for checks against the Google JavaScript style guide. File path
Expand Down Expand Up @@ -99,11 +101,13 @@ YAML settings:
(default: `true`).
- **`base_branches`**: A list of base branches for which the reviews will
trigger, apart from the default branch. Accepts regex pattern. Example:
```yaml
base_branches:
- "develop"
- "feat/.*"
```

```yaml
base_branches:
- "develop"
- "feat/.*"
```

- **`tools`**: Configurations for the tools used in the review.
- **`ast-grep`**: Configurations for the `ast-grep` tool.
- **`rule_dirs`**: The directory name where the custom `ast-grep` rules
Expand All @@ -112,16 +116,49 @@ YAML settings:
are stored.
- **`packages`**: A package allows you to share rules across multiple
projects. Essentially, a package is a collection of `ast-grep` rules.
Example:
- **`github-checks`**: Configuration for GitHub Checks integration.
- **`enabled`**: Enable integration, defaults to true.
- **`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).
- **`markdownlint`**: Configuration for `markdownlint` integration.
- **`enabled`**: Enable integration, defaults to true.
- **`ruff`**: Configuration for `ruff` integration.
- **`enabled`**: Enable integration, defaults to true.
- **`shellcheck`**: Configuration for `shellcheck` integration.
- **`enabled`**: Enable integration, defaults to true.
- **`languagetool`**: Configuration for `languagetool` integration.
- **`enabled`**: Enable integration, defaults to true.
- **`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.
- **`enabled_rules`**: IDs of rules to be enabled. The rule won't run unless 'level' is set to a level that activates the rule.
- **`disabled_rules`**: IDs of rules to be disabled.
- **`enabled_categories`**: IDs of categories to be enabled.
- **`disabled_categories`**: IDs of categories to be disabled.
- **`enabled_only`**: Only the rules and categories whose IDs are specified with `enabled_rules` or `enabled_categories` are enabled.

```yaml
ast-grep:
rule_dirs:
- "rules"
util_dirs:
- "utils"
packages:
- "ast-grep-essentials"
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
ast-grep:
rule_dirs:
- "rules"
util_dirs:
- "utils"
packages:
- "ast-grep-essentials"
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
github-checks:
enabled: true
timeout_ms: 90000
markdownlint:
enabled: true
ruff:
enabled: true
shellcheck:
enabled: true
languagetool:
enabled: true
enabled_only: false
level: default
enabled_categories:
- "TON_ACADEMIC"
- "CASING"
```

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