Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 14 additions & 15 deletions .github/skills/dev/git-workflow/run-linters/references/linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,21 @@ cargo fmt

## Linting Framework Architecture

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

```text
packages/linting/
├── src/
│ ├── linters/ # Individual linter implementations
│ │ ├── markdown.rs
│ │ ├── yaml.rs
│ │ ├── toml.rs
│ │ ├── cspell.rs
│ │ ├── clippy.rs
│ │ ├── rustfmt.rs
│ │ └── shellcheck.rs
│ ├── runner.rs # Execution logic
│ └── lib.rs
└── README.md
src/
├── linters/ # Individual linter implementations
│ ├── markdown.rs
│ ├── yaml.rs
│ ├── toml.rs
│ ├── cspell.rs
│ ├── clippy.rs
│ ├── rustfmt.rs
│ └── shellcheck.rs
├── runner.rs # Execution logic
└── lib.rs
```

### Benefits
Expand Down Expand Up @@ -314,5 +313,5 @@ cargo run --bin linter --help
## References

- [Linting Guide](../../../docs/contributing/linting.md)
- [Linting Framework README](../../../packages/linting/README.md)
- [`torrust-linting` on crates.io](https://crates.io/crates/torrust-linting)
- [Pre-Commit Process](../../../docs/contributing/commit-process.md)
2 changes: 1 addition & 1 deletion .github/skills/dev/git-workflow/run-linters/skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ For detailed configuration and reference information about each linter, see:

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

## Quick Reference

Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[workspace]
members = [
"packages/linting",
"packages/dependency-installer",
"packages/sdk",
"packages/deployer-types",
Expand Down Expand Up @@ -62,7 +61,7 @@ testcontainers = { version = "0.26", features = [ "blocking" ] }
thiserror = "2.0"
torrust-dependency-installer = { path = "packages/dependency-installer" }
torrust-deployer-types = { path = "packages/deployer-types" }
torrust-linting = { path = "packages/linting" }
torrust-linting = "0.1.0"
tracing = { version = "0.1", features = [ "attributes" ] }
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = [ "env-filter", "json", "fmt" ] }
Expand Down
2 changes: 1 addition & 1 deletion docs/codebase-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Application initialization and lifecycle management:

Independently versioned Cargo workspace packages in `packages/`:

- ✅ `packages/linting/` - Unified linting framework (runs markdownlint, yamllint, taplo, cspell, clippy, rustfmt, shellcheck)
- ✅ [`torrust-linting`](https://crates.io/crates/torrust-linting) (external crate) - Unified linting framework (runs markdownlint, yamllint, taplo, cspell, clippy, rustfmt, shellcheck)
- ✅ `packages/dependency-installer/` - Dependency detection and installation for development setup (OpenTofu, Ansible, LXD, cargo-machete)
- ✅ `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
- ✅ `packages/sdk/` - Programmatic SDK (`torrust-tracker-deployer-sdk`) — independently consumable Rust crate for deploying Torrust Tracker instances without the CLI
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/linting.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ All linting is managed through a unified Rust binary (`src/bin/linter.rs`) that
- **Unified logging**: Consistent output formatting
- **Easy extensibility**: Add new linters by implementing the `Linter` trait

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

### Alternative: Shell Script Wrapper

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/testing/quality/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When mocking adds no value or requires real infrastructure:

#### 4. Linting Package

- **Location**: `packages/linting/`
- **Location**: [`torrust-linting`](https://crates.io/crates/torrust-linting) (external crate)
- **Reason**: Primarily executed as binary, wraps external tools
- **Coverage**: 30-40% is acceptable
- **Testing**: Validated through actual execution
Expand Down Expand Up @@ -179,7 +179,7 @@ All coverage commands use cargo aliases defined in `.cargo/config.toml`:
| Alias | Full Command | Purpose |
| ------------------- | ----------------------------------------------------------------- | --------------------------------- |
| `cargo cov` | `cargo llvm-cov` | Basic coverage report in terminal |
| `cargo cov-check` | `cargo llvm-cov --all-features --workspace --fail-under-lines 70` | Validate coverage threshold |
| `cargo cov-check` | `cargo llvm-cov --all-features --workspace --fail-under-lines 70` | Validate coverage threshold |
| `cargo cov-lcov` | `cargo llvm-cov --lcov --output-path=./.coverage/lcov.info` | Generate LCOV format |
| `cargo cov-codecov` | `cargo llvm-cov --codecov --output-path=./.coverage/codecov.json` | Generate Codecov JSON |
| `cargo cov-html` | `cargo llvm-cov --html` | Generate HTML report |
Expand Down
22 changes: 1 addition & 21 deletions packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,6 @@ This directory contains reusable Rust workspace packages that support the Torrus

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

### [`linting/`](./linting/)

**Purpose**: Unified linting framework for Rust projects

**Key Features**:

- Supports multiple linters: markdown, YAML, TOML, Rust (clippy + rustfmt), shellcheck
- Pre-built CLI components for easy binary creation
- Extensible architecture for adding new linters
- Uses existing configuration files (`.taplo.toml`, `.yamllint.yml`, etc.)

**Use Cases**:

- Enforcing code quality standards
- Pre-commit validation
- CI/CD linting pipelines
- Standardizing linting across multiple projects

**Documentation**: See [packages/linting/README.md](./linting/README.md)

### [`deployer-types/`](./deployer-types/)

**Purpose**: Shared value objects and traits for the Torrust Tracker Deployer ecosystem
Expand Down Expand Up @@ -108,7 +88,7 @@ All packages in this directory:
```rust
// Add to your Cargo.toml
[dependencies]
torrust-linting = { path = "packages/linting" }
torrust-linting = "0.1.0" # external crate: https://crates.io/crates/torrust-linting
torrust-dependency-installer = { path = "packages/dependency-installer" }
torrust-tracker-deployer-sdk = { path = "packages/sdk" }
```
Expand Down
16 changes: 0 additions & 16 deletions packages/linting/Cargo.toml

This file was deleted.

138 changes: 0 additions & 138 deletions packages/linting/README.md

This file was deleted.

57 changes: 0 additions & 57 deletions packages/linting/examples/custom_cli.rs

This file was deleted.

11 changes: 0 additions & 11 deletions packages/linting/examples/simple_linter.rs

This file was deleted.

Loading
Loading