Skip to content

Commit 91b3961

Browse files
committed
chore: [#416] replace local packages/linting with torrust-linting crate
1 parent d29b860 commit 91b3961

22 files changed

Lines changed: 21 additions & 1148 deletions

File tree

.github/skills/dev/git-workflow/run-linters/references/linters.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,21 @@ cargo fmt
235235

236236
## Linting Framework Architecture
237237

238-
The unified linting framework is implemented in `packages/linting/`:
238+
The unified linting framework is provided by the [`torrust-linting`](https://crates.io/crates/torrust-linting)
239+
external crate (published to crates.io). Source: [github.com/torrust/torrust-linting](https://github.com/torrust/torrust-linting).
239240

240241
```text
241-
packages/linting/
242-
├── src/
243-
│ ├── linters/ # Individual linter implementations
244-
│ │ ├── markdown.rs
245-
│ │ ├── yaml.rs
246-
│ │ ├── toml.rs
247-
│ │ ├── cspell.rs
248-
│ │ ├── clippy.rs
249-
│ │ ├── rustfmt.rs
250-
│ │ └── shellcheck.rs
251-
│ ├── runner.rs # Execution logic
252-
│ └── lib.rs
253-
└── README.md
242+
src/
243+
├── linters/ # Individual linter implementations
244+
│ ├── markdown.rs
245+
│ ├── yaml.rs
246+
│ ├── toml.rs
247+
│ ├── cspell.rs
248+
│ ├── clippy.rs
249+
│ ├── rustfmt.rs
250+
│ └── shellcheck.rs
251+
├── runner.rs # Execution logic
252+
└── lib.rs
254253
```
255254

256255
### Benefits
@@ -314,5 +313,5 @@ cargo run --bin linter --help
314313
## References
315314

316315
- [Linting Guide](../../../docs/contributing/linting.md)
317-
- [Linting Framework README](../../../packages/linting/README.md)
316+
- [`torrust-linting` on crates.io](https://crates.io/crates/torrust-linting)
318317
- [Pre-Commit Process](../../../docs/contributing/commit-process.md)

.github/skills/dev/git-workflow/run-linters/skill.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ For detailed configuration and reference information about each linter, see:
185185

186186
- [references/linters.md](references/linters.md) - Comprehensive linter documentation
187187
- [docs/contributing/linting.md](../../../docs/contributing/linting.md) - Linting guide
188-
- [packages/linting/README.md](../../../packages/linting/README.md) - Linting framework details
188+
- [`torrust-linting` on crates.io](https://crates.io/crates/torrust-linting) - Linting framework details
189189

190190
## Quick Reference
191191

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[workspace]
22
members = [
3-
"packages/linting",
43
"packages/dependency-installer",
54
"packages/sdk",
65
"packages/deployer-types",
@@ -62,7 +61,7 @@ testcontainers = { version = "0.26", features = [ "blocking" ] }
6261
thiserror = "2.0"
6362
torrust-dependency-installer = { path = "packages/dependency-installer" }
6463
torrust-deployer-types = { path = "packages/deployer-types" }
65-
torrust-linting = { path = "packages/linting" }
64+
torrust-linting = "0.1.0"
6665
tracing = { version = "0.1", features = [ "attributes" ] }
6766
tracing-appender = "0.2"
6867
tracing-subscriber = { version = "0.3", features = [ "env-filter", "json", "fmt" ] }

docs/codebase-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Application initialization and lifecycle management:
217217

218218
Independently versioned Cargo workspace packages in `packages/`:
219219

220-
-`packages/linting/` - Unified linting framework (runs markdownlint, yamllint, taplo, cspell, clippy, rustfmt, shellcheck)
220+
-[`torrust-linting`](https://crates.io/crates/torrust-linting) (external crate) - Unified linting framework (runs markdownlint, yamllint, taplo, cspell, clippy, rustfmt, shellcheck)
221221
-`packages/dependency-installer/` - Dependency detection and installation for development setup (OpenTofu, Ansible, LXD, cargo-machete)
222222
-`packages/deployer-types/` - Shared value objects and traits (`torrust-deployer-types`) — cross-cutting foundational types (e.g., `EnvironmentName`, `DomainName`, `Username`, `Clock`, `ErrorKind`) shared by the root crate and SDK
223223
-`packages/sdk/` - Programmatic SDK (`torrust-tracker-deployer-sdk`) — independently consumable Rust crate for deploying Torrust Tracker instances without the CLI

docs/contributing/linting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ All linting is managed through a unified Rust binary (`src/bin/linter.rs`) that
7676
- **Unified logging**: Consistent output formatting
7777
- **Easy extensibility**: Add new linters by implementing the `Linter` trait
7878

79-
The linter binary is part of the `torrust-linting` package (`packages/linting/`), which provides a reusable linting framework.
79+
The linter binary uses the [`torrust-linting`](https://crates.io/crates/torrust-linting) crate, which provides a reusable linting framework published to crates.io.
8080

8181
### Alternative: Shell Script Wrapper
8282

docs/contributing/testing/quality/coverage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ When mocking adds no value or requires real infrastructure:
5353

5454
#### 4. Linting Package
5555

56-
- **Location**: `packages/linting/`
56+
- **Location**: [`torrust-linting`](https://crates.io/crates/torrust-linting) (external crate)
5757
- **Reason**: Primarily executed as binary, wraps external tools
5858
- **Coverage**: 30-40% is acceptable
5959
- **Testing**: Validated through actual execution
@@ -179,7 +179,7 @@ All coverage commands use cargo aliases defined in `.cargo/config.toml`:
179179
| Alias | Full Command | Purpose |
180180
| ------------------- | ----------------------------------------------------------------- | --------------------------------- |
181181
| `cargo cov` | `cargo llvm-cov` | Basic coverage report in terminal |
182-
| `cargo cov-check` | `cargo llvm-cov --all-features --workspace --fail-under-lines 70` | Validate coverage threshold |
182+
| `cargo cov-check` | `cargo llvm-cov --all-features --workspace --fail-under-lines 70` | Validate coverage threshold |
183183
| `cargo cov-lcov` | `cargo llvm-cov --lcov --output-path=./.coverage/lcov.info` | Generate LCOV format |
184184
| `cargo cov-codecov` | `cargo llvm-cov --codecov --output-path=./.coverage/codecov.json` | Generate Codecov JSON |
185185
| `cargo cov-html` | `cargo llvm-cov --html` | Generate HTML report |

packages/README.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,6 @@ This directory contains reusable Rust workspace packages that support the Torrus
2626

2727
**Documentation**: See [packages/dependency-installer/README.md](./dependency-installer/README.md)
2828

29-
### [`linting/`](./linting/)
30-
31-
**Purpose**: Unified linting framework for Rust projects
32-
33-
**Key Features**:
34-
35-
- Supports multiple linters: markdown, YAML, TOML, Rust (clippy + rustfmt), shellcheck
36-
- Pre-built CLI components for easy binary creation
37-
- Extensible architecture for adding new linters
38-
- Uses existing configuration files (`.taplo.toml`, `.yamllint.yml`, etc.)
39-
40-
**Use Cases**:
41-
42-
- Enforcing code quality standards
43-
- Pre-commit validation
44-
- CI/CD linting pipelines
45-
- Standardizing linting across multiple projects
46-
47-
**Documentation**: See [packages/linting/README.md](./linting/README.md)
48-
4929
### [`deployer-types/`](./deployer-types/)
5030

5131
**Purpose**: Shared value objects and traits for the Torrust Tracker Deployer ecosystem
@@ -108,7 +88,7 @@ All packages in this directory:
10888
```rust
10989
// Add to your Cargo.toml
11090
[dependencies]
111-
torrust-linting = { path = "packages/linting" }
91+
torrust-linting = "0.1.0" # external crate: https://crates.io/crates/torrust-linting
11292
torrust-dependency-installer = { path = "packages/dependency-installer" }
11393
torrust-tracker-deployer-sdk = { path = "packages/sdk" }
11494
```

packages/linting/Cargo.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/linting/README.md

Lines changed: 0 additions & 138 deletions
This file was deleted.

packages/linting/examples/custom_cli.rs

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)