Skip to content

chore(lib): fully refactor the library for v3 #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6531ec5
chore(lib): fully refactor the library for v3
jeertmans Apr 19, 2024
eef5101
fix(docs): CHANGELOG.md
jeertmans Sep 19, 2024
153b454
fix(docs): CHANGELOG.md
jeertmans Sep 19, 2024
dccdcbc
fix(ci): remove PDM install
jeertmans Sep 28, 2024
d411823
chore(lib): continuation of v3 refactor (see #117) (#120)
Rolv-Apneseth Sep 28, 2024
df0130b
fix(lib): remove duplicate key
jeertmans Sep 29, 2024
039af11
fix(ci): add codecov token
jeertmans Sep 29, 2024
a7247e4
Merge branch 'main' into v3
jeertmans Sep 29, 2024
a067522
refactor: further separate CLI logic from the API related functionali…
Rolv-Apneseth Nov 16, 2024
a90bd15
refactor: remove unnecessary code duplication from `cli/check`
Rolv-Apneseth Nov 16, 2024
ccb494a
ci: include newer versions of `languagetool` in tests (#126)
Rolv-Apneseth Nov 16, 2024
1665a9d
refactor(lib): consolidate `reqwest` errors (#125)
Rolv-Apneseth Dec 1, 2024
82bd45b
feat: add support for HTML, Markdown and Typst files (#127)
Rolv-Apneseth Jan 27, 2025
027f1ed
chore(lib): cleanup and logging
jeertmans Feb 3, 2025
6cae2f4
fix(tests): increase size of request
jeertmans Feb 3, 2025
cf9462b
fix(tests): set env to limit max text length
jeertmans Feb 3, 2025
4bb3d90
refactor: merge changes from master branch to v3 (#135)
Rolv-Apneseth Mar 11, 2025
8ad8995
chore(cli): reading from STDIN info. text is now written as logs
jeertmans Mar 12, 2025
9b3024d
chore(dev): improving coverage
jeertmans Mar 12, 2025
d14c0b9
Merge remote-tracking branch 'origin/main' into v3
jeertmans Mar 12, 2025
7e9e6cc
fix(tests): enforce language
jeertmans Mar 12, 2025
ea24862
up
jeertmans Mar 12, 2025
0614534
feat: use data annotations for HTML and Markdown files, and implement…
Rolv-Apneseth Apr 9, 2025
7e100c8
chore(test): improve test coverage (#136)
Rolv-Apneseth May 12, 2025
6ccefd7
Merge branch 'main' into v3
Rolv-Apneseth May 12, 2025
b07d7c1
fix(ci): run the LanguageTool service for the coverage CI to avoid fa…
Rolv-Apneseth May 12, 2025
abee1db
fix(ci): version for languagetool in coverage CI (#138)
Rolv-Apneseth May 12, 2025
044edf1
Merge branch 'main' into v3
jeertmans May 26, 2025
44e7208
ci(dependabot): bump actions/checkout from 2 to 4 (#148)
dependabot[bot] May 26, 2025
650fcc6
ci(dependabot): bump pre-commit-ci/lite-action from 1.0.2 to 1.1.0 (#…
dependabot[bot] May 26, 2025
7cffe92
ci(dependabot): bump tarides/changelog-check-action from 2 to 3 (#146)
dependabot[bot] May 26, 2025
42727f9
ci(dependabot): bump moonrepo/setup-rust from 0 to 1 (#147)
dependabot[bot] May 26, 2025
b1f960a
ci(dependabot): bump codecov/codecov-action from 2 to 5 (#149)
dependabot[bot] May 26, 2025
0c7eccd
fix(ci): LanguageTool env vars for coverage CI (#139)
Rolv-Apneseth May 26, 2025
4191a93
preparing for merge
jeertmans May 27, 2025
8bc0d26
chore(docs): add changelog entries and remove useless features
jeertmans May 28, 2025
b88f3c6
fix(docs): check out
jeertmans May 28, 2025
92e6431
fixes
jeertmans May 28, 2025
60c8e74
chore: bump minimum Rust version
Rolv-Apneseth May 28, 2025
1d460ea
chore(tests): update markdown snapshot
Rolv-Apneseth May 28, 2025
cc1bcaa
chore: add `docker-compose` file to simplify running a local API for …
Rolv-Apneseth Jun 2, 2025
9544555
chore(docs): contrib guide
jeertmans Jun 2, 2025
ecd702f
Merge remote-tracking branch 'origin/v3' into v3
jeertmans Jun 2, 2025
0044017
chore: lint code and update pre-commit config
jeertmans Jun 2, 2025
3a9b20d
update docs
jeertmans Jun 2, 2025
2172f71
chore(ci): disable a bunch of LT rules
jeertmans Jun 2, 2025
eca34d4
chore(docs): include note about snapshot testing in `CONTRIBUTING.md`
Rolv-Apneseth Jun 2, 2025
42263a1
tests: add snapshot test for `CONTRIBUTING.md`
Rolv-Apneseth Jun 2, 2025
da2d5f0
fix(ci): avoid running the coverage CI more than once on a PR (both p…
Rolv-Apneseth Jun 2, 2025
4ab12d0
chore(docs): fix indentation on "if some features are mutually incomp…
Rolv-Apneseth Jun 2, 2025
880f1a9
fix(ci): run changelog action on the latest Ubuntu version (retiremen…
Rolv-Apneseth Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ updates:
labels:
- dependencies
- rust
target-branch: 'v3' # TODO: change me after merging v3
- package-ecosystem: github-actions
directory: /
schedule:
Expand All @@ -19,4 +18,3 @@ updates:
labels:
- ci
- dependencies
target-branch: 'v3' # TODO: change me after merging v3
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable MD025 -->
<!-- If your PR fixes an open issue, use `Closes #999` to link your PR
with the issue. #999 stands for the issue number you are fixing -->

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
jobs:
check-changelog:
name: Check Changelog Action
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v2
- uses: tarides/changelog-check-action@v3
with:
changelog: CHANGELOG.md
34 changes: 28 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
name: Code Coverage

on: [push]
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
services:
languagetool:
image: erikvl87/languagetool:latest
ports:
- 8010:8010
env:
langtool_maxTextLength: 1500
Java_Xmx: 2g
env:
LANGUAGETOOL_HOSTNAME: http://localhost
LANGUAGETOOL_PORT: 8010
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install cargo-tarpaulin
uses: taiki-e/install-action@cargo-tarpaulin

- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml

- name: Upload to codecov.io
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
16 changes: 9 additions & 7 deletions .github/workflows/languagetool.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
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
disabled_rules: WHITESPACE_RULE,EN_UNPAIRED_QUOTES,EN_QUOTES,DASH_RULE,WORD_CONTAINS_UNDERSCORE,UPPERCASE_SENTENCE_START,ARROWS,COMMA_PARENTHESIS_WHITESPACE,UNLIKELY_OPENING_PUNCTUATION,SENTENCE_WHITESPACE,CURRENCY,EN_UNPAIRED_BRACKETS,PHRASE_REPETITION,PUNCTUATION_PARAGRAPH_END,METRIC_UNITS_EN_US,ENGLISH_WORD_REPEAT_BEGINNING_RULE
54 changes: 54 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 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 Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy,rustfmt

- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.1

- name: Apply fixes when present
uses: pre-commit-ci/lite-action@v1.1.0
if: always()
with:
msg: 'chore(fmt): auto fixes from pre-commit hooks'
14 changes: 6 additions & 8 deletions .github/workflows/CI.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -24,16 +24,15 @@ jobs:
toolchain: stable
override: true

- run: cargo publish --features full --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Publish on crates.io
run: cargo publish --features full --token ${{ secrets.CRATES_TOKEN }}
check-publish:
name: Check Publish
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -42,6 +41,5 @@ jobs:
toolchain: stable
override: true

- run: cargo publish --features cli --token ${CRATES_TOKEN} --dry-run -v
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: Check if can publish on crates.io
run: cargo publish --features cli --token ${{ secrets.CRATES_TOKEN }} --dry-run -v
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rustbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
LANGUAGETOOL_HOSTNAME: http://localhost
LANGUAGETOOL_PORT: 8010
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v0
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/rustcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ jobs:
cargo_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: taiki-e/install-action@cargo-hack
- run: cargo hack check --feature-powerset --no-dev-deps
- run: >
cargo hack check
--feature-powerset
--no-dev-deps
--clean-per-run
--group-features cli-complete,docker
--group-features typst,html,markdown
--mutually-exclusive-features native-tls,native-tls-vendored
--exclude-features snapshots
4 changes: 2 additions & 2 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
paths:
- src/lib/**.rs
- src/**.rs
- Cargo.toml
workflow_dispatch:

Expand All @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/rustlib.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
paths:
- src/lib/**.rs
- '**.rs'
- .github/workflows/rustlib.yml
- Cargo.toml
workflow_dispatch:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -30,19 +30,25 @@ jobs:
strategy:
fail-fast: false
matrix:
tag: [latest, '5.5', '5.6', '5.7', '5.8', '5.9', '6.0', '6.1']
tag: [latest, '5.5', '5.6', '5.7', '5.8', '5.9', '6.0', '6.1', '6.2', '6.3', '6.4', '6.5']
features: ['']
include:
- tag: latest
features: --all-features
runs-on: ubuntu-latest
services:
languagetool:
image: erikvl87/languagetool:${{ matrix.tag }}
ports:
- 8010:8010
env:
langtool_maxTextLength: 1500
env:
LANGUAGETOOL_HOSTNAME: http://localhost
LANGUAGETOOL_PORT: 8010
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -51,4 +57,4 @@ jobs:
uses: Swatinem/rust-cache@v2

- run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- run: cargo nextest run --all-features
- run: cargo nextest run ${{ matrix.features }} --no-capture
39 changes: 0 additions & 39 deletions .github/workflows/rustlints.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/rustmsrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
msrv_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -25,3 +25,7 @@ jobs:

- name: Check MSRV
run: cargo msrv verify -- cargo check --all-features

- name: Find MSRV if above fail
if: failure()
run: cargo msrv find -- cargo check --all-features
Loading
Loading