ruff/scripts
konstin 602b4b3519
Merge registry into codes (#4651)
* Document codes.rs

* Refactor codes.rs before merging

Helper script:
```python
# %%

from pathlib import Path

codes = Path("crates/ruff/src/codes.rs").read_text().splitlines()
rules = Path("a.txt").read_text().strip().splitlines()
rule_map = {i.split("::")[-1]: i for i in rules}

# %%

codes_new = []
for line in codes:
    if ", Rule::" in line:
        left, right = line.split(", Rule::")
        right = right[:-2]
        line = left + ", " + rule_map[right] + "),"
    codes_new.append(line)

# %%

Path("crates/ruff/src/codes.rs").write_text("\n".join(codes_new))
```

Co-authored-by: Jonathan Plasse <13716151+JonathanPlasse@users.noreply.github.com>
2023-06-02 10:33:01 +00:00
..
benchmarks markdownlint: enforce 100 char max length (#4698) 2023-05-28 22:45:56 -04:00
_utils.py Improve add_rule.py and add_plugin.py scripts (#3725) 2023-03-25 16:05:39 +00:00
add_plugin.py Pretty print Diagnostics in snapshot tests (#3906) 2023-04-11 09:03:00 +00:00
add_rule.py Merge registry into codes (#4651) 2023-06-02 10:33:01 +00:00
check_docs_formatted.py Enable pycodestyle rules (#3689) 2023-05-16 20:39:43 +00:00
check_ecosystem.py Don't assume unique repo names in ecosystem checks (#4628) 2023-05-24 16:26:12 +02:00
Dockerfile.ecosystem Remove outdated feature flag from Dockerfile.ecosystem (#4620) 2023-05-24 08:19:08 +00:00
ecosystem_all_check.py Make ecosystem all check more generic (#4629) 2023-05-24 16:26:23 +02:00
ecosystem_all_check.sh Make ecosystem all check more generic (#4629) 2023-05-24 16:26:23 +02:00
ecosystem_all_check_entrypoint.sh Make ecosystem all check more generic (#4629) 2023-05-24 16:26:23 +02:00
generate_known_standard_library.py Add script for ecosystem wide checks of all rules and fixes (#4326) 2023-05-22 15:23:25 +02:00
generate_mkdocs.py Doc/CLN: pass pre-commit (#3604) 2023-03-19 19:20:11 +00:00
pyproject.toml Add script for ecosystem wide checks of all rules and fixes (#4326) 2023-05-22 15:23:25 +02:00
transform_readme.py Fix hardcoded url in transform_readme.py (#2487) 2023-02-02 13:59:22 -05:00
update_ambiguous_characters.py Add script for ecosystem wide checks of all rules and fixes (#4326) 2023-05-22 15:23:25 +02:00
update_schemastore.py Add a script to update the schemastore (#4574) 2023-05-23 10:41:56 +00:00