Skip to content
Closed
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
27 changes: 27 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
[alias]
# Build aliases
txtx-install = "install --path crates/txtx-cli --features supervisor_ui --features ovm --locked --force"
build-cli = "build --package txtx-cli --no-default-features --features cli"
build-cli-release = "build --package txtx-cli --no-default-features --features cli --release"

# Test aliases following pattern: test-[scope]-[type]-[target]
# Unit tests (code in src/)
test-cli-unit = "test --package txtx-cli --bin txtx --no-default-features --features cli"
test-cli-unit-linter = "test --package txtx-cli --bin txtx --no-default-features --features cli cli::linter_impl::"
test-cli-unit-lsp = "test --package txtx-cli --bin txtx --no-default-features --features cli cli::lsp::"
test-core-unit = "test --package txtx-core --lib"
test-addon-kit-unit = "test --package txtx-addon-kit --lib"

# Integration tests (code in tests/)
test-cli-int = "test --package txtx-cli --tests --no-default-features --features cli"
test-cli-int-linter = "test --package txtx-cli --test linter_tests_builder --no-default-features --features cli"
test-cli-int-lsp = "test --package txtx-cli --test lsp_tests_builder --no-default-features --features cli"

# HCL validation tests
test-hcl-diagnostics = "test --package txtx-cli --bin txtx --no-default-features --features cli cli::lsp::tests::hcl_diagnostics_test" # Test HCL diagnostic extraction
test-lsp-validation = "test --package txtx-cli --bin txtx --no-default-features --features cli cli::lsp::tests::validation_integration_test" # Test LSP validation pipeline

# Convenience aliases
test-cli = "test --package txtx-cli --no-default-features --features cli" # All CLI tests
test-cli-linter = "test --package txtx-cli --bin txtx --no-default-features --features cli cli::linter_impl::" # All linter unit tests

[build]
rustflags = ["--cfg", "tokio_unstable"]



2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Syntax highlighting for txtx runbook files
*.tx linguist-language=HCL
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,35 @@ addons/sp1/examples/fibonacci/program/target
addons/ovm/examples/cache/*
addons/ovm/examples/out/*
tarpaulin-report.html

# Coverage reports
lcov.info
*.lcov
coverage/
*.profraw
*.profdata

# VSCode specific
.vscode/*
!.vscode/settings.json.example
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
*.code-workspace
.history/
*.vsix

# Structurizr generated files
.structurizr/
**/workspace.json
docs/architecture/linter/workspace-generated.dsl

# nvim tree-sitter generated files
vscode-extension/nvim-txtx/src/parser.c
vscode-extension/nvim-txtx/src/grammar.json
vscode-extension/nvim-txtx/src/node-types.json
vscode-extension/nvim-txtx/src/tree_sitter/
vscode-extension/nvim-txtx/parser/
vscode-extension/nvim-txtx/build/
vscode-extension/nvim-txtx/node_modules/
37 changes: 37 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch txtx LSP Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/vscode-extension",
"${workspaceFolder}/examples"
],
"outFiles": ["${workspaceFolder}/vscode-extension/**/*.js"],
"preLaunchTask": "Build txtx Binary"
},
{
"name": "Launch txtx LSP (Custom Project)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/vscode-extension",
"${input:projectPath}"
],
"outFiles": ["${workspaceFolder}/vscode-extension/**/*.js"],
"preLaunchTask": "Build txtx Binary"
}
],
"inputs": [
{
"id": "projectPath",
"type": "promptString",
"description": "Path to your txtx project",
"default": "${env:HOME}/your-txtx-project"
}
]
}
28 changes: 26 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,29 @@
"rust-analyzer.linkedProjects": [
],
"rust-analyzer.showUnlinkedFileNotification": false,
"git.ignoreLimitWarning": true
}
"git.ignoreLimitWarning": true,
"files.associations": {
"*.tx": "txtx"
},
"rust-analyzer.cargo.buildScripts.enable": true,
"rust-analyzer.cargo.features": ["cli"],
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.checkOnSave.command": "build",
"rust-analyzer.checkOnSave.allTargets": false,
"rust-analyzer.checkOnSave.extraArgs": [
"--package",
"txtx-cli",
"--features",
"cli"
],
"rust-analyzer.runnables.command": "cargo",
"rust-analyzer.runnables.extraArgs": [
"--package",
"txtx-cli",
"--features",
"cli"
],

// Point to the local txtx binary for LSP (uses workspace-relative path)
"txtx.lspPath": "${workspaceFolder}/target/release/txtx"
}
15 changes: 15 additions & 0 deletions .vscode/settings.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Example VSCode settings for txtx development
// Copy this to .vscode/settings.json and adjust paths as needed

// Point to your local txtx binary
"txtx.lspPath": "${workspaceFolder}/target/release/txtx",

// Enable LSP tracing for debugging
"txtx.trace.server": "verbose",

// File associations
"files.associations": {
"*.tx": "txtx"
}
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build txtx Binary",
"type": "shell",
"command": "cargo build --package txtx-cli --bin txtx",
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$rustc"
}
]
}
Loading
Loading