Skip to content

Commit

Permalink
MAINT: autoupdate pre-commit hooks (#16)
Browse files Browse the repository at this point in the history
* DX: configure VSCode Rewrap extension
* DX: synchronize ComPWA developer setup
* DX: add PR linting with shared commitlint config
* MAINT: remove quotations from EditorConfig version
* MAINT: remove GitPod config
  • Loading branch information
redeboer authored Oct 9, 2023
1 parent 7a20e69 commit 582672c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 72 deletions.
38 changes: 1 addition & 37 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,7 @@
"transision",
"transisions"
],
"ignorePaths": [
"**/.cspell.json",
"*.bib",
"*.ico",
"*.root",
"*.rst_t",
"*.svg",
"*particle*.*ml",
".constraints/*.txt",
".editorconfig",
".gitignore",
".gitpod.*",
".mypy.ini",
".pre-commit-config.yaml",
".prettierignore",
".readthedocs.yml",
".vscode/*",
".vscode/.gitignore",
"CITATION.cff",
"codecov.yml",
"Dockerfile",
"docs/_templates/*",
"docs/adr/*/*",
"docs/conf.py",
"labels.toml",
"Makefile",
"Manifest.toml",
"Project.toml",
"pyproject.toml",
"pyrightconfig.json",
"pytest.ini",
"requirements*.txt",
"setup.cfg",
"setup.py",
"tox.ini",
"typings"
],
"ignorePaths": ["**/.cspell.json", ".pre-commit-config.yaml", ".vscode/*"],
"language": "en-US",
"words": ["ampform", "compwa", "qrules", "tensorwaves", "Zenodo"],
"ignoreWords": [
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR linting
on:
pull_request:
types:
- edited
- labeled
- opened
- reopened
- synchronize
- unlabeled

jobs:
check-labels:
name: Check labels
runs-on: ubuntu-22.04
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway
with:
any_of: >-
🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX
none_of: Epic,💫 Good first issue
repo_token: ${{ secrets.GITHUB_TOKEN }}

check-title:
name: Check title
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: npm install @compwa/commitlint-config
- name: Create commitlint config
run: |
echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js
- uses: JulienKode/pull-request-name-linter-action@v0.5.0 # cspell:ignore kode
19 changes: 0 additions & 19 deletions .gitpod.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
Expand All @@ -20,22 +20,23 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.0.200
rev: 0.1.0
hooks:
- id: check-dev-files
args:
- --keep-issue-templates
- --no-gitpod
- --no-prettierrc
- --no-python
- --repo-name=compwa-github
- --repo-title=Public ComPWA GitHub profile

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v6.31.0
rev: v7.3.1
hooks:
- id: cspell

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.3
hooks:
- id: prettier
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"esbenp.prettier-vscode",
"garaioag.garaio-vscode-unwanted-recommendations",
"github.vscode-github-actions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker"
],
"unwantedRecommendations": [
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"editor.formatOnSave": true
"[git-commit]": {
"editor.rulers": [72],
"rewrap.wrappingColumn": 72
},
"editor.formatOnSave": true,
"rewrap.wrappingColumn": 88
}
11 changes: 0 additions & 11 deletions commitlint.config.js

This file was deleted.

0 comments on commit 582672c

Please sign in to comment.