style: prettier format SKILL.md

This commit is contained in:
Krzysztof Rudnicki 2026-04-12 21:58:37 +02:00
parent ba87b1582e
commit 39c47777be

View File

@ -1,6 +1,6 @@
--- ---
name: code-quality-rules name: code-quality-rules
description: 'Mandatory code quality, linting, and test coverage rules for ALL languages in this monorepo. Use BEFORE writing or modifying ANY code. Covers Python, C/C++, TypeScript, Dart/Flutter, and shell. Enforces 100% test coverage, zero lint suppressions, and pre-commit compliance.' description: "Mandatory code quality, linting, and test coverage rules for ALL languages in this monorepo. Use BEFORE writing or modifying ANY code. Covers Python, C/C++, TypeScript, Dart/Flutter, and shell. Enforces 100% test coverage, zero lint suppressions, and pre-commit compliance."
--- ---
# Code Quality Rules — All Languages # Code Quality Rules — All Languages
@ -19,13 +19,13 @@ description: 'Mandatory code quality, linting, and test coverage rules for ALL l
### Linters (ALL enabled, maximum strictness) ### Linters (ALL enabled, maximum strictness)
| Tool | Config | Key Settings | | Tool | Config | Key Settings |
|---|---|---| | --------------- | ----------------------------------- | --------------------------------------------------------------------- |
| **ruff** | `pyproject.toml [tool.ruff]` | `select = ["ALL"]`, Google docstrings, `ban-relative-imports = "all"` | | **ruff** | `pyproject.toml [tool.ruff]` | `select = ["ALL"]`, Google docstrings, `ban-relative-imports = "all"` |
| **mypy** | `pyproject.toml [tool.mypy]` | `strict = true`, all `disallow_*` and `warn_*` flags enabled | | **mypy** | `pyproject.toml [tool.mypy]` | `strict = true`, all `disallow_*` and `warn_*` flags enabled |
| **pylint** | `pyproject.toml [tool.pylint]` | `enable = "all"`, `disable = []`, `fail-under = 8.0` | | **pylint** | `pyproject.toml [tool.pylint]` | `enable = "all"`, `disable = []`, `fail-under = 8.0` |
| **bandit** | `pyproject.toml [tool.bandit]` | Security scanner, high severity, medium confidence | | **bandit** | `pyproject.toml [tool.bandit]` | Security scanner, high severity, medium confidence |
| **ruff-format** | `pyproject.toml [tool.ruff.format]` | Double quotes, spaces, auto line endings | | **ruff-format** | `pyproject.toml [tool.ruff.format]` | Double quotes, spaces, auto line endings |
### Ruff Rules ### Ruff Rules
@ -70,12 +70,12 @@ description: 'Mandatory code quality, linting, and test coverage rules for ALL l
### Linters ### Linters
| Tool | Trigger | Key Settings | | Tool | Trigger | Key Settings |
|---|---|---| | ---------------- | --------------- | ----------------------------------------------------------------- |
| **clang-format** | Pre-commit hook | Formatting enforced on all `.c`/`.cpp` files | | **clang-format** | Pre-commit hook | Formatting enforced on all `.c`/`.cpp` files |
| **cppcheck** | Pre-commit hook | `--enable=warning,portability`, `--std=c11`, `--error-exitcode=1` | | **cppcheck** | Pre-commit hook | `--enable=warning,portability`, `--std=c11`, `--error-exitcode=1` |
| **flawfinder** | Pre-commit hook | `--error-level=5` — security scanner for C/C++ | | **flawfinder** | Pre-commit hook | `--error-level=5` — security scanner for C/C++ |
| **clang-tidy** | `C/lint_all.sh` | Uses `compile_commands.json` when available | | **clang-tidy** | `C/lint_all.sh` | Uses `compile_commands.json` when available |
### Build Requirements ### Build Requirements
@ -99,10 +99,10 @@ description: 'Mandatory code quality, linting, and test coverage rules for ALL l
### Linters ### Linters
| Tool | Config | Key Settings | | Tool | Config | Key Settings |
|---|---|---| | ------------ | ------------------- | ------------------------------------------------------------- |
| **ESLint** | `eslint.config.mjs` | `eslint.configs.recommended` + `tseslint.configs.recommended` | | **ESLint** | `eslint.config.mjs` | `eslint.configs.recommended` + `tseslint.configs.recommended` |
| **Prettier** | Pre-commit (push) | Formats YAML, JSON, Markdown | | **Prettier** | Pre-commit (push) | Formats YAML, JSON, Markdown |
### ESLint Rules ### ESLint Rules
@ -128,15 +128,16 @@ description: 'Mandatory code quality, linting, and test coverage rules for ALL l
### Horatio (`horatio/`) ### Horatio (`horatio/`)
| Tool | Config | Enforcement | | Tool | Config | Enforcement |
|---|---|---| | ---------------- | ------------------------------- | ---------------------------------- |
| **dart analyze** | `horatio/analysis_options.yaml` | `--fatal-infos` — infos are errors | | **dart analyze** | `horatio/analysis_options.yaml` | `--fatal-infos` — infos are errors |
| **dart format** | melos `format` script | `--set-exit-if-changed` | | **dart format** | melos `format` script | `--set-exit-if-changed` |
| **flutter test** | `horatio/run.sh` | 100% line coverage enforced | | **flutter test** | `horatio/run.sh` | 100% line coverage enforced |
#### Analysis Rules #### Analysis Rules
The `analysis_options.yaml` enables **strict everything**: The `analysis_options.yaml` enables **strict everything**:
- `strict-casts: true`, `strict-inference: true`, `strict-raw-types: true` - `strict-casts: true`, `strict-inference: true`, `strict-raw-types: true`
- `missing_return: error`, `missing_required_param: error` - `missing_return: error`, `missing_required_param: error`
- **100+ individual lint rules** explicitly enabled (see file for full list) - **100+ individual lint rules** explicitly enabled (see file for full list)
@ -163,8 +164,8 @@ The `analysis_options.yaml` enables **strict everything**:
### Linters ### Linters
| Tool | Config | Key Settings | | Tool | Config | Key Settings |
|---|---|---| | -------------- | --------------- | -------------------------------------------------------- |
| **ShellCheck** | Pre-commit hook | `--severity=warning` — all warnings and above are errors | | **ShellCheck** | Pre-commit hook | `--severity=warning` — all warnings and above are errors |
- All shell scripts are checked on every commit (except `pomodoro_app/`). - All shell scripts are checked on every commit (except `pomodoro_app/`).
@ -174,37 +175,37 @@ The `analysis_options.yaml` enables **strict everything**:
### On Every Commit (fast, ~10s) ### On Every Commit (fast, ~10s)
| Hook | Scope | | Hook | Scope |
|---|---| | --------------------------------------------- | ---------------------------------------- |
| trailing-whitespace, end-of-file-fixer | All files | | trailing-whitespace, end-of-file-fixer | All files |
| check-yaml, check-json, check-toml, check-xml | Config files | | check-yaml, check-json, check-toml, check-xml | Config files |
| check-merge-conflict, detect-private-key | All files | | check-merge-conflict, detect-private-key | All files |
| name-tests-test (`--pytest-test-first`) | Python tests | | name-tests-test (`--pytest-test-first`) | Python tests |
| no-binaries | All files | | no-binaries | All files |
| no-noqa, no-ruff-noqa | Python — blocks ALL suppression comments | | no-noqa, no-ruff-noqa | Python — blocks ALL suppression comments |
| **ruff** (lint + fix) | Python | | **ruff** (lint + fix) | Python |
| **ruff-format** | Python | | **ruff-format** | Python |
| **clang-format** | C/C++ | | **clang-format** | C/C++ |
| **cppcheck** | C/C++ | | **cppcheck** | C/C++ |
| **flawfinder** | C/C++ | | **flawfinder** | C/C++ |
| **eslint** | TypeScript | | **eslint** | TypeScript |
| **shellcheck** | Shell scripts | | **shellcheck** | Shell scripts |
| **codespell** | All text files | | **codespell** | All text files |
| check-c-cpp-build-files | C/C++ directories | | check-c-cpp-build-files | C/C++ directories |
| check-python-location | Python must be under `python_pkg/` | | check-python-location | Python must be under `python_pkg/` |
| check-no-secrets | All files | | check-no-secrets | All files |
### On Push Only (slow) ### On Push Only (slow)
| Hook | Scope | | Hook | Scope |
|---|---| | -------------------------- | ------------------------------ |
| **mypy** | Python (strict type checking) | | **mypy** | Python (strict type checking) |
| **pylint** | Python (comprehensive linting) | | **pylint** | Python (comprehensive linting) |
| **bandit** | Python (security scanning) | | **bandit** | Python (security scanning) |
| **pytest + 100% coverage** | Python (changed subpackages) | | **pytest + 100% coverage** | Python (changed subpackages) |
| **prettier** | YAML, JSON, Markdown | | **prettier** | YAML, JSON, Markdown |
| **flutter analyze + test** | `pomodoro_app/` | | **flutter analyze + test** | `pomodoro_app/` |
| **horatio run.sh test** | `horatio/` (100% coverage) | | **horatio run.sh test** | `horatio/` (100% coverage) |
## Verification Checklist ## Verification Checklist