kvb-quality 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kvb_quality-0.1.0.dist-info/METADATA +98 -0
- kvb_quality-0.1.0.dist-info/RECORD +85 -0
- kvb_quality-0.1.0.dist-info/WHEEL +5 -0
- kvb_quality-0.1.0.dist-info/entry_points.txt +2 -0
- kvb_quality-0.1.0.dist-info/licenses/LICENSE +21 -0
- kvb_quality-0.1.0.dist-info/top_level.txt +1 -0
- quality/__init__.py +19 -0
- quality/adapters/__init__.py +489 -0
- quality/adapters/actionlint.py +44 -0
- quality/adapters/astgrep.py +298 -0
- quality/adapters/base.py +146 -0
- quality/adapters/builtin.py +334 -0
- quality/adapters/gitleaks.py +366 -0
- quality/adapters/hadolint.py +74 -0
- quality/adapters/jscpd.py +98 -0
- quality/adapters/lizard.py +49 -0
- quality/adapters/osvscanner.py +407 -0
- quality/adapters/phpmode.py +226 -0
- quality/adapters/rg.py +120 -0
- quality/adapters/ruff.py +172 -0
- quality/adapters/scancode.py +178 -0
- quality/adapters/semgrep.py +157 -0
- quality/adapters/shellcheck.py +31 -0
- quality/adapters/trivy.py +110 -0
- quality/architecture/__init__.py +0 -0
- quality/architecture/contract.py +254 -0
- quality/architecture/depcruise.py +132 -0
- quality/architecture/importlinter.py +161 -0
- quality/cli.py +152 -0
- quality/db.py +445 -0
- quality/doctor.py +205 -0
- quality/environment.py +107 -0
- quality/gate.py +375 -0
- quality/heredoc.py +77 -0
- quality/history.py +64 -0
- quality/ignorefile.py +210 -0
- quality/kinds.py +150 -0
- quality/legal/__init__.py +0 -0
- quality/legal/checks.py +299 -0
- quality/legal/dependencies.py +149 -0
- quality/legal/index.py +167 -0
- quality/legal/origin.py +166 -0
- quality/legal/registry.py +328 -0
- quality/legal/spdx.py +210 -0
- quality/modes.py +492 -0
- quality/process.py +67 -0
- quality/repo.py +473 -0
- quality/report.py +177 -0
- quality/ruledata.py +445 -0
- quality/rules/architecture.yml +19 -0
- quality/rules/ast-grep/data/hcl.yml +20 -0
- quality/rules/ast-grep/data/json.yml +15 -0
- quality/rules/ast-grep/data/nix.yml +6 -0
- quality/rules/ast-grep/data/yaml.yml +19 -0
- quality/rules/ast-grep/native/c.yml +9 -0
- quality/rules/ast-grep/native/cpp.yml +9 -0
- quality/rules/ast-grep/native/csharp.yml +52 -0
- quality/rules/ast-grep/native/go.yml +13 -0
- quality/rules/ast-grep/native/java.yml +37 -0
- quality/rules/ast-grep/native/kotlin.yml +7 -0
- quality/rules/ast-grep/native/rust.yml +47 -0
- quality/rules/ast-grep/script/bash.yml +76 -0
- quality/rules/ast-grep/script/lua.yml +6 -0
- quality/rules/ast-grep/script/php.yml +8 -0
- quality/rules/ast-grep/script/python.yml +199 -0
- quality/rules/ast-grep/script/ruby.yml +9 -0
- quality/rules/ast-grep/shared.yml +154 -0
- quality/rules/ast-grep/web/css.yml +9 -0
- quality/rules/ast-grep/web/html.yml +17 -0
- quality/rules/ast-grep/web/javascript.yml +74 -0
- quality/rules/ast-grep/web/tsx.yml +88 -0
- quality/rules/ast-grep/web/typescript.yml +88 -0
- quality/rules/clean.yml +162 -0
- quality/rules/coding.yml +153 -0
- quality/rules/comments.yml +123 -0
- quality/rules/kinds.yml +147 -0
- quality/rules/legal.yml +158 -0
- quality/rules/limits.yml +4 -0
- quality/rules/security.yml +220 -0
- quality/rules/semgrep/javascript.yml +18 -0
- quality/rules/tools.yml +128 -0
- quality/shellview.py +484 -0
- quality/snapshot.py +338 -0
- quality/suppress.py +255 -0
- quality/waivers.py +51 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kvb-quality
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: One language-agnostic quality gate for staged changes and whole repositories
|
|
5
|
+
Author-email: Kevin Veen-Birkenbach <kevin@veen.world>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/infinito-nexus/quality
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: PyYAML
|
|
12
|
+
Requires-Dist: pathspec
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# quality
|
|
16
|
+
|
|
17
|
+
Homepage: https://github.com/infinito-nexus/quality
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
`flake.lock` is the only pin source ([requirement 001](docs/requirements/001-language-agnostic-quality-check.md), decision 18). On a host with Nix, install `packages.default`, the runner wrapped with every tool by absolute store path, and call it by absolute path:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
nix profile install github:infinito-nexus/quality/<release-tag>
|
|
25
|
+
~/.nix-profile/bin/quality check --staged
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Dev stack
|
|
29
|
+
|
|
30
|
+
Hosts without Nix, CI and dev stacks use `packages.image` (`nix build .#image`), the OCI image of the same closure, published to ghcr by digest; the digest is in the release notes. A dev stack adds it as a compose service under the profile `tools` and a make target that runs it:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
services:
|
|
34
|
+
quality:
|
|
35
|
+
image: ghcr.io/infinito-nexus/quality@sha256:<digest>
|
|
36
|
+
profiles: [tools]
|
|
37
|
+
network_mode: none
|
|
38
|
+
read_only: true
|
|
39
|
+
tmpfs: [/tmp]
|
|
40
|
+
user: "65534"
|
|
41
|
+
working_dir: /src
|
|
42
|
+
volumes:
|
|
43
|
+
- .:/src:ro
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```make
|
|
47
|
+
quality-check:
|
|
48
|
+
docker compose --profile tools run --rm quality check --staged
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`--staged` needs no database. `--base` and `--all` add the deep tier, which reads the bundle of `quality db update`: mount it with `- <db>:/db:ro` and pass `--db /db`. `quality db update --licenses <repo>`, repeatable, also stores the registry licences of the exact pins at each named repository's HEAD and in its staging index for `legal.dependency-license`; a pin without an SPDX licence there stays `unchecked`, and an update without `--licenses` keeps the stored licences. Run the service from a main checkout, because a linked worktree's `.git` file points outside `/src`.
|
|
52
|
+
|
|
53
|
+
## Layer contracts
|
|
54
|
+
|
|
55
|
+
A repository that holds `.quality/architecture.yml` gets the rules `architecture.layer` and `architecture.cycle` ([requirement 005](docs/requirements/005-architecture-score.md), decision 3); each new hit lowers the architecture score by 25. Python runs through `lint-imports` of import-linter, JavaScript through `depcruise` of dependency-cruiser, both bundled like every other tool. Each section is optional, every key inside it is required, and a malformed file stops the check with an error naming the key. `source` is the directory holding the code, `.` for the root, and for JavaScript also the scope of the cycle check; `layers` lists the highest layer first, and no layer may import one above it:
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
python:
|
|
59
|
+
source: src
|
|
60
|
+
packages: [shop]
|
|
61
|
+
layers: [shop.web, shop.domain]
|
|
62
|
+
forbidden:
|
|
63
|
+
- {from: [shop.domain], to: [shop.web]}
|
|
64
|
+
javascript:
|
|
65
|
+
source: web
|
|
66
|
+
layers: [web/ui, web/core]
|
|
67
|
+
forbidden: []
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Hosted scan
|
|
71
|
+
|
|
72
|
+
The role `web-app-cst-quality-check` serves the scan as a web page ([requirement 002](docs/requirements/002-hosted-quality-scan.md)).
|
|
73
|
+
|
|
74
|
+
| Command | What it does |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `make up` | Builds the images and serves the page at <http://localhost:18098/>, or on the port `QUALITY_DEV_PORT` names; `make down` removes the stack and its volumes. Needs a vulnerability bundle at `$QUALITY_DEV_DB/bundle` (default `~/.cache/quality-check/dev-db/bundle`), created once with `quality db update --db <that path>`. An exported `INFINITO_CACHE_PACKAGE_URL` makes the Nix builds use that package cache's `raw-nixos-cache` repository. |
|
|
77
|
+
| `make test-service` | Unit tests of the web app and the launcher, in a virtual environment under `.venv/service`. |
|
|
78
|
+
| `make test-egress INFINITO_CORE_DIR=<core> EGRESS_RUNTIMES="<runtimes>"` | Egress tests against the stack of `make up`; the step flags run through that core checkout's container wrapper, and every launcher and test-proxy test runs once under each runtime of `EGRESS_RUNTIMES`, such as `"runc sysbox-runc"`, which `docker info` must offer. |
|
|
79
|
+
| `make verify-test INFINITO_CORE_DIR=<core>` | Pulls the role into a core checkout with custom-role support and runs core's full test suite, lints included. |
|
|
80
|
+
| `make verify-compose INFINITO_CORE_DIR=<core>` | Runs `verify-test` first, then deploys the role with Keycloak through that checkout and runs its Playwright spec. |
|
|
81
|
+
|
|
82
|
+
## Distribution
|
|
83
|
+
|
|
84
|
+
| Command | What it does |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `make test-distribution` | Builds `packages.default` and `packages.image`, then checks pins, notices, `quality doctor` and the image. |
|
|
87
|
+
| `make test-e2e QUALITY_E2E_SKILLS=<repo> QUALITY_E2E_PACKAGE_MANAGER=<repo> QUALITY_E2E_RUNTIME=<runtime>` | Builds both outputs and checks that the host binary and the image, run under that Docker runtime (core's `SANDBOX_RUNTIME`, such as `runsc`), print the same `quality doctor` output and report the same findings on both repositories; needs Docker and the test bundle `make test-integration` fetches. |
|
|
88
|
+
|
|
89
|
+
## Benchmarks
|
|
90
|
+
|
|
91
|
+
The speed criteria of [requirement 001](docs/requirements/001-language-agnostic-quality-check.md) and its recall bound on core run apart from `test-unit` and `test-integration`. The core checkout is only read.
|
|
92
|
+
|
|
93
|
+
| Command | What it does |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `make test-bench QUALITY_CORE_DIR=<core> QUALITY_DB_DIR=<db>` | Times `quality --version` of the built `packages.default` against 0.15 s as the median of 9 runs and its `quality check --all` on core, deep tier included, against 360 s on 20 CPUs, both timings skipped with the measured load as the reason when 50 % or more of the CPUs are busy in the 5 s before or after them, and checks that `clean.default-value` finds every shell, Python and JavaScript default of `tests/bench/default-value-hits.json`, the hits of `defaults.py` of the kvb-code-clean skill on the core commit named there, which `QUALITY_CORE_DIR` must hold. Needs `nix build .#default` of this tree and a fresh bundle of `quality db update`. |
|
|
96
|
+
|
|
97
|
+
## Author
|
|
98
|
+
Kevin Veen-Birkenbach <kevin@veen.world>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
kvb_quality-0.1.0.dist-info/licenses/LICENSE,sha256=HZ45yCTAIaoS9tYIZ6YbYNXkq3_7rpN5-IwPLc32_FY,1078
|
|
2
|
+
quality/__init__.py,sha256=ffJKgJ8CkO13faZe_VAIj2JUqnWzYxBuXlbUIhjTRS4,421
|
|
3
|
+
quality/cli.py,sha256=HdcQ1UqgfzpVvIdmc8KEDlLrEi_OyzF87f1NISTaNno,6022
|
|
4
|
+
quality/db.py,sha256=2vWzSwzNfB95kpdgV-bMKO03UkktgO68o2z7JE-3LBI,14942
|
|
5
|
+
quality/doctor.py,sha256=ni9t_O8Fwtq9DkCJXhbznSLcanAm4Nz-cXfdlTruD_Q,7146
|
|
6
|
+
quality/environment.py,sha256=bfkLU0o05SktEMdDYt4QZNq-rKB0suUgPqxCjwCdPRE,3196
|
|
7
|
+
quality/gate.py,sha256=7qqvlGHkllXyfIa0G2vKRWf2ih4Z1t5V61JHucXfrrs,13239
|
|
8
|
+
quality/heredoc.py,sha256=B0ZiR9uQ1x01mtvK1MZHrAuQ7uhUfMDmA3A-1IVVRtA,3106
|
|
9
|
+
quality/history.py,sha256=fQS-gupvXwDkSGcJsd1P3sYGsEiMjP8S6V8WLvyeg0c,2397
|
|
10
|
+
quality/ignorefile.py,sha256=cUziONziSR7ph0quzML5q-StJJwfnFU7IEE64cUlTs4,7450
|
|
11
|
+
quality/kinds.py,sha256=Y2gdJ8qNi8QmOxxL8YRzOL4k2SvSTxRnH9rmULPifzc,5374
|
|
12
|
+
quality/modes.py,sha256=8_VIbHg8KT6ReWIktWjySHKtKskDMEkDA_gYSP5lgCk,18503
|
|
13
|
+
quality/process.py,sha256=UNEhQ_uIbYaixdlU7fBfyZhMsV3TBG0VASLh0ZLBy7M,1987
|
|
14
|
+
quality/repo.py,sha256=vqTpn1YJ2-UkOQZeipvI2nohFqnNvNb4wL-UzzqJgnU,15928
|
|
15
|
+
quality/report.py,sha256=yfWEyjWBxceYFoiHDFoaQNg-vgsHKfveRBax9u-CCg0,5667
|
|
16
|
+
quality/ruledata.py,sha256=-qc1Wa0kjhCUs6I8qcOzToEH0qNzRbmHoiM2ifhxucc,15679
|
|
17
|
+
quality/shellview.py,sha256=eatRj-TvoauYC_jrp60BlKRYmydMZ6dr_JevsYYG7hc,16455
|
|
18
|
+
quality/snapshot.py,sha256=r8SaVWTUPl86JJk54_YXeXE460Te0nFyTW4rc78Xmeg,11804
|
|
19
|
+
quality/suppress.py,sha256=G6xGH5bUr6EUytmucRm2-2VJfopGFzXMKFSZwov_NJI,8746
|
|
20
|
+
quality/waivers.py,sha256=tg7A1Dw5s8Bg2ubVZ0rH3D04ioKUciAj5dMhYFt7Hno,2022
|
|
21
|
+
quality/adapters/__init__.py,sha256=IVYzcFHx8OzKihFchiprgcR_cRL9uAVT7hiIxdkSX4k,18102
|
|
22
|
+
quality/adapters/actionlint.py,sha256=9DVOaDZP-X5C2kP7sIv-VO7rQO77GwboYmedHDvp580,1080
|
|
23
|
+
quality/adapters/astgrep.py,sha256=jZTxhEZ-KWBW-upyPfLBW7Z3KHoprJlF9JMz1KWxEh8,11142
|
|
24
|
+
quality/adapters/base.py,sha256=teqIzrBc92-rwWhMhebsJjigxp-T0fD02XKZvPyTxjs,3805
|
|
25
|
+
quality/adapters/builtin.py,sha256=BuOkMIV6ozpclzZ_frN7sndgMelzxLvwjXUAbHAEVdE,9869
|
|
26
|
+
quality/adapters/gitleaks.py,sha256=wCM4SAcQHFy02-aYIHi6GcjAtdhXimirSTGpY_zpuyM,11722
|
|
27
|
+
quality/adapters/hadolint.py,sha256=scDgEJDSTJRDIN58AfsjaaNBQmrLaeuGZFqjtYyrSfM,2223
|
|
28
|
+
quality/adapters/jscpd.py,sha256=gslw9VZRYUxx7Aye5iy4lY9klDccoWK2LSum9oak1TY,3210
|
|
29
|
+
quality/adapters/lizard.py,sha256=AvSgqlG2POo_hI2fWLTsmxd1Kg7LfIYY4GAT0Z3bWNQ,1749
|
|
30
|
+
quality/adapters/osvscanner.py,sha256=YT61lRQc6QGGy4kn_GIkx72rmLJUPsXnCMOsFWW6O5A,15513
|
|
31
|
+
quality/adapters/phpmode.py,sha256=16oXdLt-iZc1zfCCJ8ek42IfpG6cc4lbeMWWqCS7kgw,7407
|
|
32
|
+
quality/adapters/rg.py,sha256=9IZ7-vFPjd0YH0M2uoNQbFFnHCHr75X_chwKidzfugo,4057
|
|
33
|
+
quality/adapters/ruff.py,sha256=FpskD6n74oD5eIhNQZJOy9fMPpiR507UtNAnII967kc,5819
|
|
34
|
+
quality/adapters/scancode.py,sha256=m0563CcM2jkd5BfSOyCqdSufoUR-H2qhoJUIILBPmlQ,6306
|
|
35
|
+
quality/adapters/semgrep.py,sha256=HNj-W8W8rWhvRMUzJL3dOL6UA7Qx-9GQt08EeZ6CAss,5497
|
|
36
|
+
quality/adapters/shellcheck.py,sha256=5Z9at0sbUutNby4ncKW9Y7fuaQ1l9gixzMuSFlFde6I,873
|
|
37
|
+
quality/adapters/trivy.py,sha256=R4nufHQsUKnIYSzZFTJuVJJxhJmz2Zs7JG9o-5I-Uyo,3622
|
|
38
|
+
quality/architecture/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
+
quality/architecture/contract.py,sha256=eNf1wQLelS821Zb26NpA6SoSPpW7Ag9ou4mFF6wheDc,8395
|
|
40
|
+
quality/architecture/depcruise.py,sha256=SDXLga2UIGAbLBbpUoV0DGBtzQyKI9-0XYl9TaXVjJg,4881
|
|
41
|
+
quality/architecture/importlinter.py,sha256=ldi82nQw_alkm4k9mZidl7XL0S3zWoF-qv2VoO9_vmQ,5443
|
|
42
|
+
quality/legal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
+
quality/legal/checks.py,sha256=6I9BYpysF302usCMYpl6OAQPXuziIExrDjIR3ahWzWo,12167
|
|
44
|
+
quality/legal/dependencies.py,sha256=QID1Z9lwlGdI81LKeRvhydIKXtIPnLO0erMq1_RXxro,4895
|
|
45
|
+
quality/legal/index.py,sha256=RNlLVwoKuwWSfzSY61Ryf0SSyHSpT2LTzi3U_jxxdSE,5256
|
|
46
|
+
quality/legal/origin.py,sha256=UMHTgoOYrLyF0VbKOTdic88oCqZXx28rjcjtMllxRlM,6414
|
|
47
|
+
quality/legal/registry.py,sha256=SH3HYrG3f9BU8C5W34rg9lmoKJWXtVn-yKU-BRgR4nk,12149
|
|
48
|
+
quality/legal/spdx.py,sha256=KY6-O-F1DULcWwCkdt5Ge4CfoAmoN_lHMmFboZukzmE,7271
|
|
49
|
+
quality/rules/architecture.yml,sha256=QIf_Ujad-Zue-dSu_VTaallmMcDcbq1wmP_MTTpxHg8,544
|
|
50
|
+
quality/rules/clean.yml,sha256=g1Cu3Z0pSyIXmWqubcRsRVGL0gjx60RM7Ibw7ATXfcg,6397
|
|
51
|
+
quality/rules/coding.yml,sha256=Rc0OK4TX9bBRbk6ZUi2enl01UpCeKL4uiRkNOcFxFto,4420
|
|
52
|
+
quality/rules/comments.yml,sha256=bUWEVwzfLSJQ1I3GpJzlZoq-SgtINXYyE8VBR9SG7BE,7058
|
|
53
|
+
quality/rules/kinds.yml,sha256=E3hB_K8rLdyIntgjgDE44UEEC_8twva_ScXubtqr7Fw,2900
|
|
54
|
+
quality/rules/legal.yml,sha256=BafLrBRDqawPr-UrePhG4zQ5POF-7cJRbwVoFhZQimk,7165
|
|
55
|
+
quality/rules/limits.yml,sha256=NjcvwLebU7_1LRPAbaB0y5vqGb0oLXCRUjoVRmFa400,84
|
|
56
|
+
quality/rules/security.yml,sha256=mu1Sj9FjjWXQBq2bXYPQWTi1YNTR6ty0oQcbsGaYwKQ,8463
|
|
57
|
+
quality/rules/tools.yml,sha256=KC6wDcH9bKHA5rBSegdKogY5kJ3osG7RPt1ONRgF0O8,2437
|
|
58
|
+
quality/rules/ast-grep/shared.yml,sha256=G8NkjzhFJrQZqhM5zuUCV31d8ppOWJ70aCOLZ6xcKEg,4670
|
|
59
|
+
quality/rules/ast-grep/data/hcl.yml,sha256=Wmdpuv1R4eXyCydPKIaJpLAU8I6pLVQhYAlNKJd-QDo,480
|
|
60
|
+
quality/rules/ast-grep/data/json.yml,sha256=nciL57UJrEI1O9Zr4uLlC3XD7xT-22GHde-DtKOj3RM,277
|
|
61
|
+
quality/rules/ast-grep/data/nix.yml,sha256=cY_F_f4qGXNIP9J_ALgiGg0EKQvkdcp0Tw_INsf3u5M,178
|
|
62
|
+
quality/rules/ast-grep/data/yaml.yml,sha256=_2IMT_vRkqlrM4VsFO9frFwBOIUc5NjQVagDQtgzAHY,376
|
|
63
|
+
quality/rules/ast-grep/native/c.yml,sha256=CbhIclU88Ok0z68zbnROjlWfJlMl151LO_4LUhkrZto,194
|
|
64
|
+
quality/rules/ast-grep/native/cpp.yml,sha256=bigalTqNtI4DtN6DE16nTsJzb4PAmD1ay9UEiF1nJSw,208
|
|
65
|
+
quality/rules/ast-grep/native/csharp.yml,sha256=Gou497yO-vmHmM6HiH0Xzz-3SN_dWX_ECDfbRu2rbDA,1591
|
|
66
|
+
quality/rules/ast-grep/native/go.yml,sha256=Mxd2yhrXBftlQgMtgZhPDlI8STv9m-xIuggoCekKHnE,320
|
|
67
|
+
quality/rules/ast-grep/native/java.yml,sha256=Dvv-CwUGaeKmFYW8Tfu_bJ_CCkU-AH-yaGMby_V7o7w,980
|
|
68
|
+
quality/rules/ast-grep/native/kotlin.yml,sha256=7isVu4Xf5QIfNSPtrALwXDQyj3OTTZaD7wTL3ST8OOY,168
|
|
69
|
+
quality/rules/ast-grep/native/rust.yml,sha256=QMIoSrAeiQhxXgrGQnLHUwPk6F-SuXw_2rGY0LsZpfc,1337
|
|
70
|
+
quality/rules/ast-grep/script/bash.yml,sha256=JKlE4MsLFQrwjjuszMjJU9N5pk8hHsQZ71VlTXtbQHg,2435
|
|
71
|
+
quality/rules/ast-grep/script/lua.yml,sha256=TYWALAwxs5GGTXYy_lb7G7r4d60APvFi8aLqpqrUuhs,151
|
|
72
|
+
quality/rules/ast-grep/script/php.yml,sha256=oncism1VEhwRBhPYmEiIs6_nI5jRk9v6E5goFUcfBeg,176
|
|
73
|
+
quality/rules/ast-grep/script/python.yml,sha256=wORyJJ-lbiRQa8NezHNEXFi3U1ztj8BSUud-QztVH0E,4730
|
|
74
|
+
quality/rules/ast-grep/script/ruby.yml,sha256=qGfEXYqyqll34MsSNjF-TW1l9WdtRezqeK_zIHTUX_U,196
|
|
75
|
+
quality/rules/ast-grep/web/css.yml,sha256=ra9O1vLxoq5Lv6zr3XaRy1oHxN3IsOORXgnwNZZErkI,159
|
|
76
|
+
quality/rules/ast-grep/web/html.yml,sha256=gdGNHUhb57wAv5abRclgHGmFkmcHRtujSq99RQdZvOA,452
|
|
77
|
+
quality/rules/ast-grep/web/javascript.yml,sha256=qP7nY3JZQ6aKJ-fvg447DW-eyn4jE2LspQbDtk6Be9g,2092
|
|
78
|
+
quality/rules/ast-grep/web/tsx.yml,sha256=IEGN6XWdPByd8aOzw5KZu-uOGKBM8S35cHova_IW9XY,2569
|
|
79
|
+
quality/rules/ast-grep/web/typescript.yml,sha256=vba2sJYIT-k1dxwzUt0KmfiwlRjp_pXxb5nfuU33Pn4,2611
|
|
80
|
+
quality/rules/semgrep/javascript.yml,sha256=wJ6AMskamvWS5OXLdvleHCo_jgtNSde6m8Ws4hvQCu4,722
|
|
81
|
+
kvb_quality-0.1.0.dist-info/METADATA,sha256=L6DjrCxw2HrJJVvyBzSH0LEG5--q0QEC1RJN7_2AGu4,6127
|
|
82
|
+
kvb_quality-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
83
|
+
kvb_quality-0.1.0.dist-info/entry_points.txt,sha256=eVGOg1x8qTsAaZE1ug09nrOS7OsR0DYz-UJiOsIhD10,45
|
|
84
|
+
kvb_quality-0.1.0.dist-info/top_level.txt,sha256=ZOP70ChprP9l5QdBUV2tkCSoH9J-2gnABoMOZrj31cs,8
|
|
85
|
+
kvb_quality-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kevin Veen-Birkenbach
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
quality
|
quality/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class QualityError(Exception):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def printable(text: str) -> str:
|
|
9
|
+
"""
|
|
10
|
+
Args:
|
|
11
|
+
text: Output that may hold a file name or an ignore reason from the target.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
The text with every non-printable character escaped.
|
|
15
|
+
"""
|
|
16
|
+
return "".join(
|
|
17
|
+
char if char.isprintable() else char.encode("unicode_escape").decode("ascii")
|
|
18
|
+
for char in text
|
|
19
|
+
)
|