-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lib): fully refactor the library for v3
- Loading branch information
Showing
19 changed files
with
2,096 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
name: LanguageTool | ||
|
||
on: | ||
pull_request: | ||
path: | | ||
"README.md" | ||
workflow_dispatch: | ||
|
||
name: LanguageTool check | ||
|
||
jobs: | ||
languagetool_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: reviewdog/action-languagetool@v1 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check and report | ||
uses: reviewdog/action-languagetool@v1 | ||
with: | ||
reporter: github-pr-review | ||
patterns: README.md | ||
patterns: '*.md src/**.rs' | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Lint code and (optionally) apply fixes | ||
name: Lint code | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: 0 0 * * 1 # Every monday | ||
workflow_dispatch: | ||
|
||
jobs: | ||
auto-update: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run autoupdate | ||
run: pre-commit autoupdate | ||
|
||
- name: Create a pull request with updated versions | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
branch: update/pre-commit-hooks | ||
title: 'chore(deps): update pre-commit hooks' | ||
commit-message: 'chore(deps): update pre-commit hooks' | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name != 'schedule' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: true | ||
|
||
- name: Install Rust nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy,rustfmt | ||
|
||
- name: Install dependencies | ||
run: | | ||
pdm install -G test,github-action | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected] | ||
|
||
- name: Apply fixes when present | ||
uses: pre-commit-ci/[email protected] | ||
if: always() | ||
with: | ||
msg: 'chore(fmt): auto fixes from pre-commit hooks' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.35.0 | ||
hooks: | ||
- id: markdownlint-fix | ||
args: [--ignore, LICENSE.md] | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.10.0 | ||
rev: v2.13.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: [--autofix] | ||
- id: pretty-format-toml | ||
args: [--autofix] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.35.0 | ||
args: [--autofix, --trailing-commas] | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: markdownlint-fix | ||
args: [--ignore, LICENSE.md] | ||
- id: cargo-check | ||
- id: clippy | ||
- repo: local | ||
hooks: | ||
- id: fmt | ||
name: fmt | ||
description: Format files with cargo fmt | ||
entry: cargo +nightly fmt -- | ||
language: system | ||
types: [rust] | ||
args: [] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell |
Oops, something went wrong.