mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Fix yamllint recommendations
This commit is contained in:
parent
9cbfcde81a
commit
346d5c0de7
35 changed files with 312 additions and 238 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -1,2 +1,4 @@
|
|||
---
|
||||
|
||||
github: asottile
|
||||
open_collective: pre-commit
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: validate_manifest
|
||||
name: Validate Pre-Commit Manifest
|
||||
description: This validator validates a pre-commit hooks manifest file
|
||||
entry: pre-commit-validate-manifest
|
||||
language: python
|
||||
files: ^(\.pre-commit-hooks\.yaml|hooks\.yaml)$
|
||||
---
|
||||
|
||||
- id: validate_manifest
|
||||
name: Validate Pre-Commit Manifest
|
||||
description: This validator validates a pre-commit hooks manifest file
|
||||
entry: pre-commit-validate-manifest
|
||||
language: python
|
||||
files: ^(\.pre-commit-hooks\.yaml|hooks\.yaml)$
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
|
||||
trigger:
|
||||
branches:
|
||||
include: [master, test-me-*]
|
||||
|
|
@ -13,46 +15,46 @@ resources:
|
|||
ref: refs/tags/v2.0.0
|
||||
|
||||
jobs:
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [py37]
|
||||
os: windows
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
|
||||
displayName: Add conda to PATH
|
||||
- powershell: |
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\perl\bin"
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\perl\site\bin"
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\c\bin"
|
||||
displayName: Add strawberry perl to PATH
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [py37]
|
||||
os: linux
|
||||
name_postfix: _latest_git
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- template: step--git-install.yml
|
||||
- bash: |
|
||||
testing/get-coursier.sh
|
||||
echo '##vso[task.prependpath]/tmp/coursier'
|
||||
displayName: install coursier
|
||||
- bash: |
|
||||
testing/get-swift.sh
|
||||
echo '##vso[task.prependpath]/tmp/swift/usr/bin'
|
||||
displayName: install swift
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [pypy3, py36, py37, py38, py39]
|
||||
os: linux
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- bash: |
|
||||
testing/get-coursier.sh
|
||||
echo '##vso[task.prependpath]/tmp/coursier'
|
||||
displayName: install coursier
|
||||
- bash: |
|
||||
testing/get-swift.sh
|
||||
echo '##vso[task.prependpath]/tmp/swift/usr/bin'
|
||||
displayName: install swift
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [py37]
|
||||
os: windows
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
|
||||
displayName: Add conda to PATH
|
||||
- powershell: |
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\perl\bin"
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\perl\site\bin"
|
||||
Write-Host "##vso[task.prependpath]C:\Strawberry\c\bin"
|
||||
displayName: Add strawberry perl to PATH
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [py37]
|
||||
os: linux
|
||||
name_postfix: _latest_git
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- template: step--git-install.yml
|
||||
- bash: |
|
||||
testing/get-coursier.sh
|
||||
echo '##vso[task.prependpath]/tmp/coursier'
|
||||
displayName: install coursier
|
||||
- bash: |
|
||||
testing/get-swift.sh
|
||||
echo '##vso[task.prependpath]/tmp/swift/usr/bin'
|
||||
displayName: install swift
|
||||
- template: job--python-tox.yml@asottile
|
||||
parameters:
|
||||
toxenvs: [pypy3, py36, py37, py38, py39]
|
||||
os: linux
|
||||
pre_test:
|
||||
- task: UseRubyVersion@0
|
||||
- bash: |
|
||||
testing/get-coursier.sh
|
||||
echo '##vso[task.prependpath]/tmp/coursier'
|
||||
displayName: install coursier
|
||||
- bash: |
|
||||
testing/get-swift.sh
|
||||
echo '##vso[task.prependpath]/tmp/swift/usr/bin'
|
||||
displayName: install swift
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: hook
|
||||
name: hook
|
||||
entry: ./hook.sh
|
||||
language: script
|
||||
files: \.py$
|
||||
---
|
||||
|
||||
- id: hook
|
||||
name: hook
|
||||
entry: ./hook.sh
|
||||
language: script
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: arg-per-line
|
||||
name: Args per line hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
args: [hello, world]
|
||||
---
|
||||
|
||||
- id: arg-per-line
|
||||
name: Args per line hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
args: [hello, world]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
- id: sys-exec
|
||||
name: sys-exec
|
||||
entry: python -c 'import os; import sys; print(sys.executable.split(os.path.sep)[-2]) if os.name == "nt" else print(sys.executable.split(os.path.sep)[-3])'
|
||||
language: conda
|
||||
files: \.py$
|
||||
- id: additional-deps
|
||||
name: additional-deps
|
||||
entry: python
|
||||
language: conda
|
||||
files: \.py$
|
||||
---
|
||||
|
||||
- id: sys-exec
|
||||
name: sys-exec
|
||||
entry: python -c 'import os; import sys; print(sys.executable.split(os.path.sep)[-2]) if os.name == "nt" else print(sys.executable.split(os.path.sep)[-3])'
|
||||
language: conda
|
||||
files: \.py$
|
||||
|
||||
- id: additional-deps
|
||||
name: additional-deps
|
||||
entry: python
|
||||
language: conda
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: echo-java
|
||||
name: echo-java
|
||||
description: echo from java
|
||||
entry: echo-java
|
||||
language: coursier
|
||||
---
|
||||
|
||||
- id: echo-java
|
||||
name: echo-java
|
||||
description: echo from java
|
||||
entry: echo-java
|
||||
language: coursier
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
- id: docker-hook
|
||||
name: Docker test hook
|
||||
entry: echo
|
||||
language: docker
|
||||
files: \.txt$
|
||||
---
|
||||
|
||||
- id: docker-hook-arg
|
||||
name: Docker test hook
|
||||
entry: echo -n
|
||||
language: docker
|
||||
files: \.txt$
|
||||
- id: docker-hook
|
||||
name: Docker test hook
|
||||
entry: echo
|
||||
language: docker
|
||||
files: \.txt$
|
||||
|
||||
- id: docker-hook-failing
|
||||
name: Docker test hook with nonzero exit code
|
||||
entry: bork
|
||||
language: docker
|
||||
files: \.txt$
|
||||
- id: docker-hook-arg
|
||||
name: Docker test hook
|
||||
entry: echo -n
|
||||
language: docker
|
||||
files: \.txt$
|
||||
|
||||
- id: docker-hook-failing
|
||||
name: Docker test hook with nonzero exit code
|
||||
entry: bork
|
||||
language: docker
|
||||
files: \.txt$
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
- id: echo-entrypoint
|
||||
name: echo (via --entrypoint)
|
||||
language: docker_image
|
||||
entry: --entrypoint echo cogniteev/echo
|
||||
- id: echo-cmd
|
||||
name: echo (via cmd)
|
||||
language: docker_image
|
||||
entry: cogniteev/echo echo
|
||||
---
|
||||
|
||||
- id: echo-entrypoint
|
||||
name: echo (via --entrypoint)
|
||||
language: docker_image
|
||||
entry: --entrypoint echo cogniteev/echo
|
||||
|
||||
- id: echo-cmd
|
||||
name: echo (via cmd)
|
||||
lguage: docker_image
|
||||
entry: cogniteev/echo echo
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: dotnet example hook
|
||||
name: dotnet example hook
|
||||
entry: testeroni
|
||||
language: dotnet
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: dotnet example hook
|
||||
name: dotnet example hook
|
||||
entry: testeroni
|
||||
language: dotnet
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: dotnet example hook
|
||||
name: dotnet example hook
|
||||
entry: testeroni
|
||||
language: dotnet
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: dotnet example hook
|
||||
name: dotnet example hook
|
||||
entry: testeroni
|
||||
language: dotnet
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: python-files
|
||||
name: Python files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [python]
|
||||
exclude_types: [python3]
|
||||
---
|
||||
|
||||
- id: python-files
|
||||
name: Python files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [python]
|
||||
exclude_types: [python3]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: failing_hook
|
||||
name: Failing hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: .
|
||||
---
|
||||
|
||||
- id: failing_hook
|
||||
name: Failing hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: .
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: golang-hook
|
||||
name: golang example hook
|
||||
entry: golang-hello-world
|
||||
language: golang
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: golang-hook
|
||||
name: golang example hook
|
||||
entry: golang-hello-world
|
||||
language: golang
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: logfile test hook
|
||||
name: Logfile test hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: .
|
||||
log_file: test.log
|
||||
---
|
||||
|
||||
- id: logfile test hook
|
||||
name: Logfile test hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: .
|
||||
log_file: test.log
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
- id: bash_hook
|
||||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: 'foo.py'
|
||||
- id: bash_hook2
|
||||
name: Bash hook
|
||||
entry: bin/hook2.sh
|
||||
language: script
|
||||
files: ''
|
||||
- id: bash_hook3
|
||||
name: Bash hook
|
||||
entry: bin/hook3.sh
|
||||
language: script
|
||||
files: 'bar.py'
|
||||
---
|
||||
|
||||
- id: bash_hook
|
||||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: 'foo.py'
|
||||
|
||||
- id: bash_hook2
|
||||
name: Bash hook
|
||||
entry: bin/hook2.sh
|
||||
language: script
|
||||
files: ''
|
||||
|
||||
- id: bash_hook3
|
||||
name: Bash hook
|
||||
entry: bin/hook3.sh
|
||||
language: script
|
||||
files: 'bar.py'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: node
|
||||
files: \.js$
|
||||
---
|
||||
|
||||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: node
|
||||
files: \.js$
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: versioned-node-hook
|
||||
name: Versioned node hook
|
||||
entry: versioned-node-hook
|
||||
language: node
|
||||
language_version: 9.3.0
|
||||
files: \.js$
|
||||
---
|
||||
|
||||
- id: versioned-node-hook
|
||||
name: Versioned node hook
|
||||
entry: versioned-node-hook
|
||||
language: node
|
||||
language_version: 9.3.0
|
||||
files: \.js$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: not-found-exe
|
||||
name: Not found exe
|
||||
entry: i-dont-exist-lol
|
||||
language: system
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: not-found-exe
|
||||
name: Not found exe
|
||||
entry: i-dont-exist-lol
|
||||
language: system
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: perl-hook
|
||||
name: perl example hook
|
||||
entry: pre-commit-perl-hello
|
||||
language: perl
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: perl-hook
|
||||
name: perl example hook
|
||||
entry: pre-commit-perl-hello
|
||||
language: perl
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: prints_cwd
|
||||
name: Prints Cwd
|
||||
entry: pwd
|
||||
language: system
|
||||
files: \.sh$
|
||||
---
|
||||
|
||||
- id: prints_cwd
|
||||
name: Prints Cwd
|
||||
entry: pwd
|
||||
language: system
|
||||
files: \.sh$
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: python3-hook
|
||||
name: Python 3 Hook
|
||||
entry: python3-hook
|
||||
language: python
|
||||
language_version: python3
|
||||
files: \.py$
|
||||
---
|
||||
|
||||
- id: python3-hook
|
||||
name: Python 3 Hook
|
||||
entry: python3-hook
|
||||
language: python
|
||||
language_version: python3
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: python
|
||||
files: \.py$
|
||||
---
|
||||
|
||||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: python
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: python_venv
|
||||
files: \.py$
|
||||
---
|
||||
|
||||
- id: foo
|
||||
name: Foo
|
||||
entry: foo
|
||||
language: python_venv
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: ruby_hook
|
||||
name: Ruby Hook
|
||||
entry: ruby_hook
|
||||
language: ruby
|
||||
files: \.rb$
|
||||
---
|
||||
|
||||
- id: ruby_hook
|
||||
name: Ruby Hook
|
||||
entry: ruby_hook
|
||||
language: ruby
|
||||
files: \.rb$
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: ruby_hook
|
||||
name: Ruby Hook
|
||||
entry: ruby_hook
|
||||
language: ruby
|
||||
language_version: 2.5.1
|
||||
files: \.rb$
|
||||
---
|
||||
|
||||
- id: ruby_hook
|
||||
name: Ruby Hook
|
||||
entry: ruby_hook
|
||||
language: ruby
|
||||
language_version: 2.5.1
|
||||
files: \.rb$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: rust-hook
|
||||
name: rust example hook
|
||||
entry: rust-hello-world
|
||||
language: rust
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: rust-hook
|
||||
name: rust example hook
|
||||
entry: rust-hello-world
|
||||
language: rust
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: bash_hook
|
||||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
---
|
||||
|
||||
- id: bash_hook
|
||||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
- id: stdout-stderr
|
||||
name: stdout-stderr
|
||||
language: script
|
||||
entry: ./stdout-stderr-entry
|
||||
- id: tty-check
|
||||
name: tty-check
|
||||
language: script
|
||||
entry: ./tty-check-entry
|
||||
---
|
||||
|
||||
- id: stdout-stderr
|
||||
name: stdout-stderr
|
||||
language: script
|
||||
entry: ./stdout-stderr-entry
|
||||
- id: tty-check
|
||||
name: tty-check
|
||||
language: script
|
||||
entry: ./tty-check-entry
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: swift-hooks-repo
|
||||
name: Swift hooks repo example
|
||||
description: Runs the hello world app generated by swift package init --type executable (binary called swift_hooks_repo here)
|
||||
entry: swift_hooks_repo
|
||||
language: swift
|
||||
files: \.(swift)$
|
||||
---
|
||||
|
||||
- id: swift-hooks-repo
|
||||
name: Swift hooks repo example
|
||||
description: Runs the hello world app generated by swift package init --type executable (binary called swift_hooks_repo here)
|
||||
entry: swift_hooks_repo
|
||||
language: swift
|
||||
files: \.(swift)$
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: system-hook-with-spaces
|
||||
name: System hook with spaces
|
||||
entry: bash -c 'echo "Hello World"'
|
||||
language: system
|
||||
files: \.sh$
|
||||
---
|
||||
|
||||
- id: system-hook-with-spaces
|
||||
name: System hook with spaces
|
||||
entry: bash -c 'echo "Hello World"'
|
||||
language: system
|
||||
files: \.sh$
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- id: python-cython-files
|
||||
name: Python and Cython files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [file]
|
||||
types_or: [python, cython]
|
||||
---
|
||||
|
||||
- id: python-cython-files
|
||||
name: Python and Cython files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [file]
|
||||
types_or: [python, cython]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
- id: python-files
|
||||
name: Python files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [python]
|
||||
---
|
||||
|
||||
- id: python-files
|
||||
name: Python files
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
types: [python]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue