A mystical code review tool for Workday Extend applications.
βοΈ Validate. Visualize. Improve. β PMD, Pod, and Script compliance with wizard-level precision.
Arcane Auditor channels ancient wisdom through 42 comprehensive validation rules to reveal hidden quality issues that compilers cannot detect but master code wizards should catch. This mystical tool analyzes:
- π PMD Files: Page definitions with embedded scripts, endpoints, and presentation layers
- π§© Pod Files: Reusable components with template widgets and endpoint configurations
- π Script Files: Standalone .script files with function libraries and utilities
- π AMD Files: Application manifest definitions
- π SMD Files: Security manifest definitions
Like having an experienced Extend developer over your shoulder. No more wondering if you're following the style guide!
Actually parses PMD Script to analyze complexity and qualityβnot just text matching.
Violations are reported according to the exact line in your source files - no more hunting through hundreds of lines of code.
- 42 comprehensive rules covering script quality and structural issues
- Intelligent function tracking - knows when functions are called across sections
- Cross-field analysis - detects issues that span multiple script blocks
- Context-aware validation - understands PMD/Pod/Script/AMD/SMD relationships
Layered config system protects your customizations during updates. Your personal and team configs are never overwritten.
- Console: Quick feedback during development
- Excel: Detailed reports with context sheets for stakeholder review
- JSON: Optimal for CI system or ingestion by external tools
- Web Interface: Visual analysis with drag-and-drop convenience
UV is the fastest and easiest way to get started!
- Automatically downloads Python - no separate installation needed
- 10-100x faster than pip
- Install UV:
- Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" - macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh - More options: UV Installation Guide
- Windows:
- Verify:
uv --version
π‘ That's all you need! UV handles Python installation automatically when you run the tool.
π§ Advanced users: If you cannot use UV, see Alternative Installation Methods for pip instructions.
- Download the latest release
- Extract to your desired location
- Install dependencies (first time only):
cd ArcaneAuditor uv sync
| Use Case | Best Choice | Why? |
|---|---|---|
| First-time users | π Web Interface | Visual, intuitive, no commands to remember |
| Quick analysis | π Web Interface | Drag & drop, instant results |
| CI/CD pipelines | βοΈ Command Line | Scriptable, exit codes, automation-friendly |
| Batch processing | βοΈ Command Line | Process multiple archives efficiently |
| Custom workflows | βοΈ Command Line | Full control over configuration and output |
-
Run the startup script:
cd ArcaneAuditor # Windows start-web-service.bat # macOS/Linux ./start-web-service.sh
The script automatically starts the server, and opens your browser!
-
Upload your application ZIP file or drag & drop individual files
-
Review results and download Excel reports
Quick commands:
cd ArcaneAuditor
# Analyze a complete application
uv run main.py review-app myapp.zip
# Analyze individual files
uv run main.py review-app file1.pmd file2.pod file3.script
# Use specific configuration
uv run main.py review-app myapp.zip --config my-config
# Generate Excel report
uv run main.py review-app myapp.zip --format excel --output report.xlsxπ‘ No Python installation needed! UV automatically downloads and manages Python when you run
uv run.
π¦ Installation Details (click to expand)
Best for: Contributing or staying on latest development
# Clone the repository
git clone https://github.com/Developers-and-Dragons/ArcaneAuditor.git
cd ArcaneAuditor
# Install dependencies
uv sync
# Optional: Run tests
uv run pytestBest for: Restricted environments without UV
β οΈ Requires Python 3.12+ pre-installed
# Download and extract release
cd ArcaneAuditor
# Install dependencies
pip install -r requirements.txt
# Run without 'uv run' prefix
python main.py review-app myapp.zip
python web/server.py --port 8080- π Drag & Drop Upload: Easy file selection with ZIP or individual files
- βοΈ Configuration Presets: Choose from
developmentorproduction-readymodes - π Real-time Results: Quick analysis with detailed violation reports
- π₯ Excel Export: Comprehensive reports with context information
- π Theme Support: Dark and light modes
Quick Launch (Recommended):
# Windows - Auto-opens browser
start-web-service.bat
# macOS/Linux - Auto-opens browser
./start-web-service.shCustom Options:
# Custom port
start-web-service.bat --port 3000
# Specific host (for network access)
./start-web-service.sh --host 0.0.0.0 --port 8080
# Don't auto-open browser
start-web-service.bat --no-browserπ‘ Tip: See WEB_SERVICE_SCRIPTS.md for advanced options.
π API Endpoints
GET /- Main interfacePOST /upload- File uploadGET /job/{job_id}- Job statusGET /download/{job_id}/excel- Download Excel reportGET /configurations- Available configurationsGET /static/{file}- Static assets
Arcane Auditor uses a layered configuration system that protects your customizations:
development- Lenient rules for active development- Allows console logs, unused code, work-in-progress
- Perfect for daily coding
production-ready- Comprehensive validation for deployment- All rules enabled, strict settings
- Catches everything including cleanup items
- Command Line Arguments
- Personal Configuration (
config/personal/*.json) β Update-safe - Team Configuration (
config/teams/*.json) β Update-safe - Built-in Presets (
config/presets/*.json)β οΈ Overwritten on app updates - don't modify these!
Generate a baseline:
uv run main.py generate-config > config/personal/my-config.jsonExample personal config (config/personal/my-settings.json):
{
"rules": {
"ScriptConsoleLogRule": {
"enabled": false
},
"ScriptLongBlockRule": {
"custom_settings": {
"max_lines": 50,
"skip_comments": true,
"skip_blank_lines": true
}
}
}
}Use custom config:
uv run main.py review-app myapp.zip --config my-configπ Full details: See Configuration Guide
Arcane Auditor enforces 42 validation rules across 2 categories:
Code Quality:
- Cyclomatic complexity limits
- Function length restrictions
- Nesting depth checks
- Magic number detection
Best Practices:
- Use
let/constinstead ofvar - Array method usage over manual loops
- Template literals over string concatenation
- Descriptive parameter names
Dead Code Detection:
- Unused functions (embedded scripts)
- Unused variables
- Dead code (standalone .script files)
- Unused function parameters
- Unused script includes
Widget Validation:
- Required IDs on widgets
- Naming convention enforcement
- Footer pod structure
Endpoint Configuration:
- Error handling (failOnStatusCodes)
- Naming conventions
- Performance patterns (isCollection, bestEffort)
Security & Hardcoding:
- Security domain requirements
- Hardcoded WIDs and application IDs
- Workday API URL patterns
File Organization:
- File naming conventions
- PMD section ordering
- String interpolator patterns
π Complete rule details: See Rule Documentation
π€ CI/CD Integration
| Code | Meaning | Use Case |
|---|---|---|
| 0 | β Success | Clean code, or ADVICE issues only |
| 1 | ACTION issues found | |
| 2 | β Usage Error | Invalid config/files |
| 3 | π₯ Runtime Error | Analysis failed |
# Standard: Fail on ACTION issues only
uv run main.py review-app myapp.zip --format json --output report.json
if [ $? -eq 1 ]; then
echo "β Code quality issues - review required"
exit 1
fi
# Strict: Fail on both ACTION and ADVICE
uv run main.py review-app myapp.zip --fail-on-advice --quiet
# Check exit code programmatically
uv run main.py review-app myapp.zip
case $? in
0) echo "β
Clean" ;;
1) echo "β οΈ Issues found" ;;
2) echo "β Tool misconfigured" ;;
3) echo "π₯ Analysis failed" ;;
esac--fail-on-advice- Fail on ADVICE issues (stricter)--quiet- Minimal output for logs--format json --output report.json- Machine-readable output for tooling--format excel --output report.xlsx- Human-readable reports for review
π§ Context Awareness
Arcane Auditor provides intelligent context awareness:
When all files are provided (PMD, AMD, SMD), runs all enabled rules.
When files of certain types are missing:
- Runs available rules on provided files
- Indicates which files are missing
- Shows which rules couldn't execute
- Provides guidance for complete validation
# ZIP analysis (complete)
uv run main.py review-app myapp.zip
# Individual files (partial)
uv run main.py review-app mypage.pmd
# Multiple files
uv run main.py review-app file1.pmd file2.pod file3.scriptπ‘ The tool clearly shows analysis completeness in all output formats.
π οΈ Contributing & Development Setup
# Clone repository
git clone https://github.com/Developers-and-Dragons/ArcaneAuditor.git
cd ArcaneAuditor
# Install dependencies
uv sync
# Run tests
uv run pytestweb/ β Web interface (FastAPI + frontend)
tests/ β Automated test suite
config/ β Presets, team, and personal configs
docs/ β Documentation
parser/rules/ β Validation rules
βββ script/ β Script quality rules
βββ structure/ β Structure validation rules
βββ custom/ β Custom rule support
- Fork the repository
- Create feature branch:
git checkout -b feature-name - Make changes and add tests
- Run test suite:
uv run pytest - Commit:
git commit -m "Add feature" - Push and create Pull Request
Create custom rules in parser/rules/custom/user/:
from parser.rules.base import Rule, Finding
from parser.models import ProjectContext
from typing import Generator
class MyCustomRule(Rule):
ID = "CUSTOM001"
DESCRIPTION = "My organization-specific rule"
SEVERITY = "ADVICE"
def analyze(self, context: ProjectContext) -> Generator[Finding, None, None]:
# Your validation logic
passπ Full guide: See Custom Rules Guide
- Rule Documentation - All 42 rules with examples
- Configuration Guide - Configuration options and presets
- Custom Rules Guide - Create your own rules
- Web Service Scripts - Startup script documentation
This project is licensed under the MIT License - see the LICENSE file for details.
β If Arcane Auditor helps you, star the repo and share the magic!
May the Weave guide your code to perfection! β¨






