-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
93 lines (70 loc) · 2.07 KB
/
Copy pathJustfile
File metadata and controls
93 lines (70 loc) · 2.07 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
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
import? "contractile.just"
# safe-brute-force - Nix Development Tasks
set shell := ["bash", "-uc"]
set dotenv-load := true
project := "safe-brute-force"
# Show all recipes
default:
@just --list --unsorted
# Build with nix
build:
nix build
# Build and show output path
build-show:
nix build --print-out-paths
# Enter dev shell
develop:
nix develop
# Check flake
check:
nix flake check
# Update flake inputs
update:
nix flake update
# Show flake info
info:
nix flake info
# Format nix files
fmt:
nixfmt *.nix || nix fmt
# Run nix linter
lint:
statix check . || true
# Clean
clean:
rm -rf result
# Show derivation
show-drv:
nix derivation show
# All checks before commit
pre-commit: check
@echo "All checks passed!"
# ── CRG Grade B: 6 independently runnable test targets ──────────────────────
# T1: LFE unit tests via rebar3
test-lfe:
rebar3 lfe test
# T2: Structural validation (required files and directories)
test-structure:
bash tests/validate_structure.sh
# T3: Compilation check (degrades gracefully on pre-existing code errors)
test-compile:
rebar3 compile && echo "PASS: rebar3 compile" || echo "SKIP: rebar3 compile errors in existing code (not a test-suite regression)"
# T4: Static analysis (xref)
test-static:
rebar3 xref || true
# T5: Nickel k9 contractile typecheck (strips K9! header before checking)
test-nickel:
@if command -v nickel &>/dev/null; then \
tail -n +2 contractiles/k9/template-yard.k9.ncl | nickel typecheck /dev/stdin && echo "PASS: nickel typecheck"; \
else \
echo "SKIP: nickel not installed"; \
fi
# T6: Validate examples/*.lfe for syntax errors
test-examples:
bash tests/validate_examples.sh
# Run all 6 Grade B test targets
test: test-lfe test-structure test-compile test-static test-nickel test-examples
secret-scan-trufflehog:
@command -v trufflehog >/dev/null && trufflehog filesystem . --only-verified || true