Repository navigation
Contributing
Canonical source: CONTRIBUTING.md. By taking part you agree to follow the Code of Conduct.
New contributors are welcome. Bug reports, false-positive or false-negative reports, new rules, new languages and documentation fixes all help.
- Issues labeled
good first issueare small and well scoped. -
help wantedissues are bigger pieces of the roadmap. - Comment on an issue before starting so work is not duplicated.
- Questions and ideas go to Discussions.
Other labels you will see: enhancement, bug, documentation, taint-tracking, configuration, new-language, packaging, accessibility.
Ideas and known gaps; none of these exist yet. Help is welcome on both.
-
Deeper taint tracking: call chains of two or more levels, and calls across files. (Python already follows one level within a file on
main; that ships in the next release. v1.4.0 stays inside one function.) -
A PyPI release, so
pip installworks without the GitHub URL.
Issues #1–#6 are closed. Their work is on main and ships in the next release: one-level intra-file Python taint (#1, #8), inline suppressions (#2, #14), [tool.code-cleaner] project config (#3, #15), TypeScript (#4, #16), the dead Python 3.9 pins (#5, #7), and Java taint tracking (#6, #18). See the Changelog.
-
Bugs: open an issue with the bug template. False positives and missed findings: use the "False positive or missed finding" form. Include the smallest input that shows the problem, the command you ran, and
code-cleaner versionoutput. -
Security vulnerabilities in Code Cleaner itself: do not open a public issue. Email ml.innovations.research.lab@gmail.com with the subject
Code Cleaner security, as described in SECURITY.md. The supported line is 1.4.x. - Ideas: open an issue with the feature template before writing a large change.
git clone https://github.com/ZodiacDog/Code-Cleaner.git
cd Code-Cleaner
python -m venv .venv && . .venv/bin/activate
pip install -e ".[all]"
python -m unittest discover -s tests -t . # unit, v1.2 and repository tests
python tests/test_all_languages.py # smoke test, all languages
python tests/stress_test_suite.py # 240 robustness checks (about 30 s)
CODE_CLEANER_NO_TREESITTER=1 python -m unittest tests.test_v12 # fallback path
code-cleaner analyze code_cleaner scripts --fail-on critical # self-analysis gate used by CIPython 3.10 is the oldest supported version; do not use syntax or stdlib features newer than 3.10. Run the unit tests both with and without the extras when you touch a parser path. CI runs Python 3.10–3.13, each with a bare and an [all] install.
- Every new rule needs an explicit
rule_id, a severity that follows the policy in CONTRIBUTING.md, a suggestion, a CWE for security rules, and tests. - After adding or changing rules, run
python scripts/gen_rules_doc.pyand commit the updateddocs/rules.md. - Update
CHANGELOG.mdunder an "Unreleased" heading, and the docs if behaviour changes. Only quote numbers from real runs. - Keep the public API backward compatible. Keep the core free of third-party dependencies.
- New source files carry the project name line only. Do not copy personal contact details into new files. Keep existing file headers as they are.
- Fork, create a branch, make focused commits.
- Make sure the tests pass locally and CI is green.
- Fill in the pull-request template.
If you are a first-time contributor to this repository, GitHub may hold your Actions workflows until a maintainer clicks Approve and run workflows on the pull request. That is a GitHub protection, not a failing test, and it is separate from review and merge. The maintainer will approve the workflows after looking at the changes.
Code Cleaner is licensed under the Apache License 2.0. By submitting a contribution you agree that it is licensed under the same terms (section 5 of the license). Keep the NOTICE file intact.
Credit follows the commits and the GitHub account on the pull request. Contributors are listed in the git history; see also AUTHORS.md. If someone else also contributed, say so on the pull request so a Co-authored-by trailer can be added.
Created by ML / ML Innovations Research Lab. Korg (AI assistant, Grok Bot), contributor. · Repository · Apache License 2.0
Start here
Using Code Cleaner
Contributing