Skip to content

Add linter documentation #59

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 13 commits into from
Jul 15, 2024
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
Add Yamllint documentation and configuration
  • Loading branch information
hasit committed Jul 15, 2024
commit 9d01dfe8bdad47aced345db188c46d31fe993b7f
2 changes: 2 additions & 0 deletions docs/guides/tools/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ Remove extraneous f prefix
- [Hadolint](./hadolint.md)
- [SwiftLint](./swiftlint.md)
- [PHPStan](./phpstan.md)
- [golangci-lint](./golangci-lint.md)
- [YamlLint](./yamllint.md)
46 changes: 46 additions & 0 deletions docs/guides/tools/yamllint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Yamllint
sidebar_label: Yamllint
description: CodeRabbit's guide to Yamllint.
sidebar_position: 8
---

[Yamllint](https://yamllint.readthedocs.io/en/stable/) is a linter for YAML.

## Files

Yamllint will run on files with the following extensions:

- `.yaml`
- `.yml`

## Configuration

Yamllint supports the following config files:

- `.yamllint`
- `.yamllint.yaml`
- `.yamllint.yml`

CodeRabbit will use the following settings based on the profile selected if no config file is found:

### Chill

```yaml
extends: relaxed
rules:
line-length: disable
```

### Assertive

```yaml
extends: default
rules:
line-length: disable
document-start: disable
```

## Links

- [Yamllint Configuration](https://yamllint.readthedocs.io/en/stable/configuration.html)