-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjustfile
More file actions
264 lines (198 loc) · 5.86 KB
/
justfile
File metadata and controls
264 lines (198 loc) · 5.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# Justfile for Rovo project
# Run `just` or `just --list` to see available commands
# Default recipe shows available commands
default:
@just --list
# Run all tests
test:
cargo test --all-features --workspace
# Run tests quietly
test-quiet:
cargo test --all-features --workspace --quiet
# Run tests including ignored ones
test-rust-all:
cargo test --all-features --workspace -- --include-ignored
# Run all tests (Rust + VSCode + JetBrains)
test-all: test vscode-test jetbrains-test
@echo "All tests passed!"
# Run clippy lints
lint:
cargo clippy --all-targets --all-features
# Fix clippy warnings automatically
lint-fix:
cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features
# Lint all projects (Rust + VSCode + JetBrains)
lint-all: lint vscode-lint jetbrains-lint
@echo "All linting completed!"
# Fix all lint issues (Rust + VSCode)
lint-fix-all: lint-fix vscode-lint-fix
@echo "All lint fixes applied!"
# Format code
fmt:
cargo fmt --all
# Check formatting without making changes
fmt-check:
cargo fmt --all -- --check
# Build the project
build:
cargo build --all-features
# Build in release mode
build-release:
cargo build --release --all-features
# Build all projects (Rust + VSCode + JetBrains)
build-all: build vscode-build jetbrains-build
@echo "All builds completed!"
# Clean build artifacts
clean:
cargo clean
# Run the todo_api example with swagger UI
example:
cargo run --example todo_api --features swagger
# Run all checks (fmt, clippy, test)
check: fmt-check lint test
# Run all checks and fixes
fix: fmt lint-fix test
# Check for outdated dependencies
outdated:
cargo outdated
# Check for security vulnerabilities
audit:
cargo audit
# Check for unused dependencies
unused-deps:
cargo machete
# Check licenses
licenses:
cargo deny check licenses
# Run all deny checks (licenses, advisories, bans, sources)
deny-check:
cargo deny check
# Update dependencies
update:
cargo update
# Build documentation
docs:
cargo doc --all-features --no-deps --open
# Build documentation without opening
docs-build:
cargo doc --all-features --no-deps
# Run benchmarks (if any)
bench:
cargo bench --all-features
# Install development tools
install-tools:
cargo install cargo-outdated
cargo install cargo-audit
cargo install cargo-edit
cargo install cargo-machete
cargo install cargo-deny
# Prepare for release (run all checks)
pre-release: fmt lint test
@echo "All checks passed! Ready for release."
# Watch for changes and run tests
watch:
cargo watch -x test
# Watch for changes and run clippy
watch-lint:
cargo watch -x clippy
# --- Coverage Commands ---
# Run tests with coverage report (HTML)
coverage:
cargo llvm-cov --all-features --workspace --html
# Run tests with coverage report (terminal summary only)
coverage-summary:
cargo llvm-cov --all-features --workspace --summary-only
# Run tests with coverage and open HTML report
coverage-open:
cargo llvm-cov --all-features --workspace --html --open
# Generate lcov.info for CI/external tools
coverage-lcov:
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
# Clean coverage artifacts
coverage-clean:
cargo llvm-cov clean
# Install coverage tool
install-coverage:
cargo install cargo-llvm-cov
# --- LSP-Specific Commands ---
# Test only the LSP crate
test-lsp:
cargo test --package rovo-lsp --all-features
# Test LSP with coverage
coverage-lsp:
cargo llvm-cov --package rovo-lsp --all-features --html --open
# Build the LSP binary
build-lsp:
cargo build --package rovo-lsp --release
# Run LSP server (for manual testing)
run-lsp:
cargo run --package rovo-lsp
# Test only code actions
test-code-actions:
cargo test --package rovo-lsp --test code_actions_test
# Test only handlers
test-handlers:
cargo test --package rovo-lsp --test handlers_test
# Watch LSP tests
watch-lsp:
cargo watch -x "test --package rovo-lsp"
# Update compilefail test outputs
update-compilefail:
TRYBUILD=overwrite cargo test compile_fail_tests
# --- Combined Commands ---
# Run all quality checks including coverage
check-all: fmt-check lint-all test-all coverage-summary
@echo "All quality checks passed!"
# Quick check (no coverage)
quick-check: fmt-check lint test-quiet
@echo "Quick checks passed!"
# --- VSCode Extension Commands ---
# Install VSCode extension dependencies
vscode-install:
cd vscode-rovo && npm install
# Build VSCode extension
vscode-build:
cd vscode-rovo && npm run compile
# Lint VSCode extension
vscode-lint:
cd vscode-rovo && npm run lint
# Fix VSCode extension lint issues
vscode-lint-fix:
cd vscode-rovo && npm run lint:fix
# Package VSCode extension
vscode-package:
cd vscode-rovo && npm run package
# Publish VSCode extension (requires VSCE_PAT)
vscode-publish:
cd vscode-rovo && npx vsce publish
# Test VSCode extension (TypeScript type checking)
vscode-test:
cd vscode-rovo && npm test
# Install local VSCode extension for testing
vscode-install-local: vscode-package
#!/usr/bin/env bash
set -euo pipefail
cd vscode-rovo
VSIX=$(ls -t *.vsix | head -1)
code --uninstall-extension arthurdw.rovo-lsp || true
code --install-extension "$VSIX"
echo "Installed $VSIX. Reload VSCode to activate."
# --- JetBrains Plugin Commands ---
# Build JetBrains plugin
jetbrains-build:
cd jetbrains-plugin && ./gradlew build
# Lint JetBrains plugin
jetbrains-lint:
cd jetbrains-plugin && ./gradlew check
# Test JetBrains plugin
jetbrains-test:
cd jetbrains-plugin && ./gradlew test
# Build JetBrains plugin for distribution
jetbrains-package:
cd jetbrains-plugin && ./gradlew buildPlugin
# Run JetBrains plugin in IDE sandbox
jetbrains-run:
cd jetbrains-plugin && ./gradlew runIde
# Verify JetBrains plugin
jetbrains-verify:
cd jetbrains-plugin && ./gradlew verifyPlugin