Skip to content

Commit 6ae4c36

Browse files
committed
docs: improve copilot instructions with accurate commands and comprehensive coverage
- Fix incorrect E2E test commands (cargo e2e-provision -> cargo run --bin e2e-provision-tests) - Update tech stack to include all linting tools (markdownlint, yamllint, shellcheck, clippy, rustfmt, taplo) - Add comprehensive directory structure with data/templates/, examples/, fixtures/, packages/ - Include key configuration files section (.markdownlint.json, .yamllint-ci.yml, .taplo.toml, etc.) - Standardize on 'cargo run --bin linter all' as primary linting command - Emphasize cargo machete as MANDATORY before commits - Add individual linter options and clarify script vs binary relationship - Update virtualization providers to be more specific about LXD VM instances - Enhance build & test section with unified and individual E2E test commands
1 parent 8cf7d81 commit 6ae4c36

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

.github/copilot-instructions.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,29 @@ This is a deployment infrastructure proof-of-concept for the Torrust ecosystem.
88

99
- **Languages**: Rust, Shell scripts, YAML, TOML
1010
- **Infrastructure**: OpenTofu (Terraform), Ansible
11-
- **Providers**: LXD containers, Multipass VMs
12-
- **Tools**: Docker, cloud-init
11+
- **Virtualization Providers**: LXD VM instances
12+
- **Tools**: Docker, cloud-init, testcontainers
13+
- **Linting Tools**: markdownlint, yamllint, shellcheck, clippy, rustfmt, taplo (TOML)
1314

1415
## 📁 Key Directories
1516

1617
- `src/` - Rust source code and binaries
17-
- `templates/ansible/` - Ansible playbook templates
18-
- `templates/tofu/` - OpenTofu/Terraform configuration templates
18+
- `data/templates/` - Source template files for Ansible and OpenTofu
19+
- `templates/` - Generated template examples and test fixtures
1920
- `build/` - Generated runtime configurations (git-ignored)
2021
- `docs/` - Project documentation
22+
- `scripts/` - Shell scripts for development tasks
23+
- `examples/` - Example configurations and usage patterns
24+
- `fixtures/` - Test data and keys for development
25+
- `packages/` - Rust workspace packages (linting tools)
26+
27+
## 📄 Key Configuration Files
28+
29+
- `.markdownlint.json` - Markdown linting rules
30+
- `.yamllint-ci.yml` - YAML linting configuration
31+
- `.taplo.toml` - TOML formatting and linting
32+
- `cspell.json` - Spell checking configuration
33+
- `project-words.txt` - Project-specific dictionary
2134

2235
## 🔧 Essential Rules
2336

@@ -31,14 +44,10 @@ This is a deployment infrastructure proof-of-concept for the Torrust ecosystem.
3144
3. **Before committing**: Always run these verifications - all must pass before staging files or creating commits, regardless of the tool or method used:
3245

3346
```bash
34-
# Run cargo machete
35-
cargo machete
36-
# Run linters
37-
./scripts/lint.sh
38-
# Run tests
39-
cargo test
40-
# Run e2e tests
41-
cargo run --bin e2e-tests
47+
cargo machete # Run cargo machete (MANDATORY - no unused dependencies)
48+
cargo run --bin linter all # Run linters (comprehensive - stable & nightly toolchains)
49+
cargo test # Run tests
50+
cargo run --bin e2e-tests # Run e2e tests
4251
```
4352

4453
This applies to **any** method of committing:
@@ -51,11 +60,15 @@ This is a deployment infrastructure proof-of-concept for the Torrust ecosystem.
5160

5261
## 🧪 Build & Test
5362

54-
- **Lint**: `./scripts/lint.sh` (comprehensive - tests stable & nightly toolchains)
63+
- **Lint**: `cargo run --bin linter all` (comprehensive - tests stable & nightly toolchains)
64+
- Individual linters: `cargo run --bin linter {markdown|yaml|toml|clippy|rustfmt|shellcheck}`
65+
- Alternative: `./scripts/lint.sh` (wrapper that calls the Rust binary)
5566
- **Dependencies**: `cargo machete` (mandatory before commits - no unused dependencies)
5667
- **Build**: `cargo build`
5768
- **Test**: `cargo test`
5869
- **Unit Tests**: When writing unit tests, follow conventions described in [`docs/contributing/testing.md`](../docs/contributing/testing.md)
59-
- **E2E Tests**: `cargo e2e-provision && cargo e2e-config`
70+
- **E2E Tests**: `cargo run --bin e2e-tests` (unified) or individual tests:
71+
- `cargo run --bin e2e-provision-tests` - Infrastructure provisioning
72+
- `cargo run --bin e2e-config-tests` - Configuration testing
6073

6174
Follow the project conventions and ensure all checks pass.

0 commit comments

Comments
 (0)