Skip to content

Commit

Permalink
add yamllint pre-commit hook (#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-keller committed Aug 22, 2024
1 parent 8af27ac commit 35b6f5b
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
codecov:
branch: master

coverage:
range: "95..100"

status:
project: no
project: false

flags:
library:
Expand Down
23 changes: 13 additions & 10 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
# These are supported funding model platforms

github: [thehesiod, terrycain] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
github:
- thehesiod
- terrycain
patreon:
open_collective:
ko_fi:
tidelift:
community_bridge:
liberapay:
issuehunt:
otechie:
custom:
17 changes: 9 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
1 change: 1 addition & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: "Pre-commit"

on:
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
---
# This workflow warns and then closes issues and PRs that have had no activity
# for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
Expand All @@ -7,7 +9,7 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '31 21 * * *'
- cron: '31 21 * * *'
workflow_dispatch:

jobs:
Expand All @@ -19,8 +21,14 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v5
with:
stale-issue-message: 'This issue has been marked as stale because it has been inactive for more than 60 days. Please update this pull request or it will be automatically closed in 7 days.'
stale-pr-message: 'This pull request has been marked as stale because it has been inactive for more than 60 days. Please update this pull request or it will be automatically closed in 7 days.'
operations-per-run: '60'
- uses: actions/stale@v5
with:
stale-issue-message: >-
This issue has been marked as stale because it has been inactive for
more than 60 days. Please update this pull request or it will be
automatically closed in 7 days.
stale-pr-message: >-
This pull request has been marked as stale because it has been
inactive for more than 60 days. Please update this pull request or
it will be automatically closed in 7 days.
operations-per-run: '60'
38 changes: 22 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: 'https://github.com/PyCQA/isort'
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: 'https://github.com/PyCQA/isort'
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict]
9 changes: 5 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2

build:
Expand All @@ -10,9 +11,9 @@ sphinx:

python:
install:
- path: .
- requirements: docs/requirements.txt
- path: .
- requirements: docs/requirements.txt

formats:
- htmlzip
- epub
- htmlzip
- epub
15 changes: 15 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
extends: default

rules:
indentation:
level: error
indent-sequences: false
truthy:
allowed-values:
- >-
false
- >-
true
- >- # Allow "on" key name in GHA CI/CD workflow definitions
on

0 comments on commit 35b6f5b

Please sign in to comment.