mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Added back git hook example for non-github users.
This commit is contained in:
parent
4b65372d4a
commit
48c910d0e3
@ -1,8 +1,8 @@
|
|||||||
## Integrating Pyright into Continuous Integration (CI)
|
## Integrating Pyright into Continuous Integration (CI)
|
||||||
|
|
||||||
### Running Pyright as a pre-commit hook
|
### Running Pyright as a github action
|
||||||
|
|
||||||
You can configure pyright to run as a git hook (e.g. prior to each check-in) by using the following hook definition:
|
You can configure pyright to run as a github action.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- uses: jakebailey/pyright-action@v1
|
- uses: jakebailey/pyright-action@v1
|
||||||
@ -12,6 +12,22 @@ You can configure pyright to run as a git hook (e.g. prior to each check-in) by
|
|||||||
|
|
||||||
Refer to the [pyright-action project](https://github.com/jakebailey/pyright-action) for more options.
|
Refer to the [pyright-action project](https://github.com/jakebailey/pyright-action) for more options.
|
||||||
|
|
||||||
|
### Running Pyright as a pre-commit hook
|
||||||
|
|
||||||
|
If you do not use github, the following git hook will also work.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: pyright
|
||||||
|
name: pyright
|
||||||
|
entry: pyright
|
||||||
|
language: node
|
||||||
|
pass_filenames: false
|
||||||
|
types: [python]
|
||||||
|
# Replace the version below with the latest pyright version
|
||||||
|
additional_dependencies: ['pyright@1.1.XXX']
|
||||||
|
```
|
||||||
|
|
||||||
### Running Pyright from a CI script
|
### Running Pyright from a CI script
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user