Skip to content

Commit

Permalink
Update selene docs about pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
amitds1997 committed Oct 30, 2023
1 parent 44020ad commit 05b36fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 0 additions & 8 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
- id: selene
name: selene (cargo)
description: An opinionated Lua code linter
entry: selene
language: rust
types:
- lua

- id: selene-system
name: selene (system)
description: An opinionated Lua code linter
Expand Down
3 changes: 2 additions & 1 deletion docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Configuration](./usage/configuration.md)
- [Filtering](./usage/filtering.md)
- [Standard Library Format](./usage/std.md)
- [Version control integration](./usage/version-control-integration.md)
- [Roblox Guide](./roblox.md)
- [Contributing](./contributing.md)
- [Lints](./lints/index.md)
Expand Down Expand Up @@ -42,4 +43,4 @@
- [unscoped_variables](./lints/unscoped_variables.md)
- [unused_variable](./lints/unused_variable.md)
- [Archive](./archive/index.md)
- [TOML Standard Library Format](./archive/std_v1.md)
- [TOML Standard Library Format](./archive/std_v1.md)
10 changes: 10 additions & 0 deletions docs/src/usage/version-control-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To integrate selene with git, you can use [pre-commit](https://pre-commit.com). Once you have [pre-commit installed](https://pre-commit.com/#install), add this to the `.pre-commit-config.yaml` at root of your repository:
```yaml
repos:
- repo: https://github.com/Kampfkarren/selene
rev: '' # Change this value to use a different version of Selene
hooks:
- id: selene-system # Use the selene binary already present on system path
- id: selene-docker # To use docker to run the hook, needs docker to be present
```
You need to mention only one of the two hooks ids depending upon if you already have the binary available or not on your system path.

0 comments on commit 05b36fe

Please sign in to comment.