File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: AGPL-3.0-or-later
2+ name : RSR Language Policy
3+
4+ on :
5+ push :
6+ branches : [main]
7+ pull_request :
8+ branches : [main]
9+
10+ permissions : read-all
11+
12+ jobs :
13+ check-banned-patterns :
14+ name : Check for banned languages/patterns
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
18+
19+ - name : Check for TypeScript
20+ run : |
21+ if find . -name "*.ts" -o -name "*.tsx" | grep -v node_modules | grep -q .; then
22+ echo "::error::TypeScript files found! Use ReScript instead (per RSR policy)"
23+ exit 1
24+ fi
25+ echo "✓ No TypeScript files found"
26+
27+ - name : Check for Go
28+ run : |
29+ if find . -name "*.go" | grep -q .; then
30+ echo "::error::Go files found! Use Rust instead (per RSR policy)"
31+ exit 1
32+ fi
33+ echo "✓ No Go files found"
34+
35+ - name : Check for npm/Node artifacts
36+ run : |
37+ if [ -f "package-lock.json" ] || [ -d "node_modules" ]; then
38+ echo "::error::npm artifacts found! Use Deno instead (per RSR policy)"
39+ exit 1
40+ fi
41+ echo "✓ No npm artifacts found"
42+
43+ - name : Check for Python (non-SaltStack)
44+ run : |
45+ banned_py=$(find . -name "*.py" | grep -v -E "(salt|pillar|states|_modules|_states)" | head -1)
46+ if [ -n "$banned_py" ]; then
47+ echo "::error::Python files found outside SaltStack! Use ReScript/Rust (per RSR policy)"
48+ exit 1
49+ fi
50+ echo "✓ No banned Python files found"
51+
52+ - name : Check for Makefiles
53+ run : |
54+ if [ -f "Makefile" ] || [ -f "makefile" ] || find . -name "*.mk" | grep -q .; then
55+ echo "::error::Makefile found! Use Justfile or Mustfile instead (per RSR policy)"
56+ exit 1
57+ fi
58+ echo "✓ No Makefiles found"
You can’t perform that action at this time.
0 commit comments