← Back to Documentation
Documentation
Repository Guidelines
Project Structure & Module Organization
- The tracked filter list and compiler configuration files live in
BloqrAI/bloqr-blocklists(formerlydata/in this repo). src/contains the multi-language rules-compiler toolchain:src/rules-compiler-*(TypeScript/Deno, .NET, Python, Rust, shell) compilers that use@bloqr/compiler-core.src/rules-compiler-powershell/class-based PowerShell modules and Pester tests.src/rules-validator/Rust validation library and CLI.src/website/Gatsby documentation site.
docs/holds guides and reference documentation.- The AdGuard DNS API clients (.NET, TypeScript, Rust, PowerShell) and the Linear import tool moved to
BloqrAI/bloqr-apiclientsand are no longer part of this repo.
Build, Test, and Development Commands
- Compile rules (any platform):
./src/rules-compiler-shell/bash/compile-rules.sh -c config.yaml -r(seesrc/rules-compiler-shell/). - TypeScript compiler (
src/adblock-compiler-core/):deno cache src/mod.ts— cache dependenciesdeno task compile— compile rulesdeno task lint— Deno lintdeno task test— Deno tests
- .NET (
src/rules-compiler-dotnet/):dotnet restore RulesCompiler.slnx,dotnet build RulesCompiler.slnx,dotnet test RulesCompiler.slnx - Python (
src/rules-compiler-python/):pip install -e ".[dev]",pytest,ruff check .,mypy . - Rust (
src/rules-compiler-rust/,src/rules-validator/):cargo build,cargo test,cargo fmt,cargo clippy - PowerShell (
src/rules-compiler-powershell/):Invoke-Pester -Path ./src/rules-compiler-powershell -Recurse - Docker dev env:
docker build -f Dockerfile.warp .(use when you want a pre-baked toolchain).
Coding Style & Naming Conventions
- Follow the conventions of each language and keep changes scoped to the module you're touching.
- TypeScript/Deno: 2-space indentation,
deno lintenforced; tests use*.test.tswith Deno test. - .NET: match existing casing (PascalCase types/methods); prefer nullable-safe APIs; keep solutions in
.slnx. - Python:
ruff(line length 100) +mypy(typed, strict-ish); tests usetests/test_*.py. - PowerShell: use approved verbs and keep functions discoverable (
Verb-Noun); PSScriptAnalyzer is run in CI.
Testing Guidelines
- Add/adjust tests alongside changes (unit tests preferred; integration tests where appropriate).
- Run the closest test suite first (e.g.,
deno task test,dotnet test,pytest,cargo test,Invoke-Pester).
Commit & Pull Request Guidelines
- Prefer Conventional Commit style when practical (examples:
feat(rules-compiler-python): ...,docs(readme): ...); short imperative messages likeRefactor: ...are also used. - PRs should include: a clear description, linked issue(s) when applicable, and test evidence (paste output or CI link). Include screenshots for website/UI changes.
Security & Configuration Notes
- Follow
SECURITY.mdfor vulnerability reporting. - Secrets (e.g., AdGuard API key) must come from environment variables/config files and never be committed. API-client secrets now apply to the tools in
BloqrAI/bloqr-apiclients.