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 golangci-lint, PHPStan, and SwiftLint documentation and configura…
…tion
  • Loading branch information
hasit committed Jul 15, 2024
commit ba5b5052ed9536925cc21608d918b6981eca936f
29 changes: 29 additions & 0 deletions docs/guides/tools/golangci-lint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: golangci-lint
sidebar_label: golangci-lint
description: CodeRabbit's guide to golangci-lint.
sidebar_position: 8
---

[golangci-lint](https://golangci-lint.run/) is a fast Go linters runner.

## Files

golangci-lint will run on files with the following extensions:

- `.go`
- `go.mod`

## Configuration

golangci-lint supports the following config files:

- User-defined config file set at `reviews.tools.golangci-lint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → golangci-lint → Config File" field in CodeRabbit's settings page.
- `.golangci.yml`
- `.golangci.yaml`
- `.golangci.toml`
- `.golangci.json`

## Links

- [golangci-lint Configuration](https://golangci-lint.run/usage/configuration/)
28 changes: 28 additions & 0 deletions docs/guides/tools/phpstan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: PHPStan
sidebar_label: PHPStan
description: CodeRabbit's guide to PHPStan.
sidebar_position: 8
---

[PHPStan](https://phpstan.org/) is a static analysis tool for PHP.

## Files

PHPStan will run on files with the following extensions:

- `.php`

## Configuration

PHPStan supports the following config files:

- `phpstan.neon`
- `phpstan.neon.dist`
- `phpstan.dist.neon`

CodeRabbit will not run PHPStan if no config file is found.

## Links

- [PHPStan Configuration](https://phpstan.org/config-reference)
2 changes: 1 addition & 1 deletion docs/guides/tools/swiftlint.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ SwiftLint will run on files with the following extensions:

Ruff supports the following config files:

- User-defined config file set at `reviews.tools.swiftlint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → SwiftLint → Config File" field in CodeRabbit's settings page.
- `.swiftlint.yaml`
- `.swiftlint.yml`
- User-defined config file set at `reviews.tools.swiftlint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → SwiftLint → Config File" field in CodeRabbit's settings page.

CodeRabbit will use the following settings if no config file is found:

Expand Down
2 changes: 2 additions & 0 deletions docs/guides/tools/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ Remove extraneous f prefix
- [LanguageTool](./languagetool.md)
- [Biome](./biome.md)
- [Hadolint](./hadolint.md)
- [SwiftLint](./swiftlint.md)
- [PHPStan](./phpstan.md)