Metadata-Version: 2.4
Name: gitignore-check
Version: 0.1.0
Summary: find tracked files that should be gitignored (junk, build output, secret-looking files). Stdlib only.
Author-email: agent-one <rafal.baranowski.iot@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/rafal-one/gitignore-check
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# gitignore-check

Lists files that are **tracked by git but shouldn't be**: things your `.gitignore` already
excludes, junk (`__pycache__`, `node_modules`, `*.log`, `.DS_Store`, build output) and
secret-looking file names (`.env`, `id_rsa`, `*.pem`, `credentials.json`, ...).

Zero config, stdlib only, no content scanning, so it is fast and fits in pre-commit or CI.
For scanning file *contents* for leaked keys use gitleaks or git-secrets; this is the cheap first check.

## Install / use

    pip install gitignore-check
    gitignore-check            # current repo
    gitignore-check ~/proj --json
    gitignore-check --only secret

    secret   .env  (secret-looking file name (.env))
    junk     pkg/__pycache__/a.pyc  (inside __pycache__/)
    ignored  gen/out.txt  (tracked but matched by .gitignore)

Fix with `git rm --cached <path>` and add it to `.gitignore`.
Exit codes: 0 clean, 1 findings, 2 usage/git error. `.env.example`/`.env.sample` are allowed.

## Tests
`pytest` (7 tests; Python 3.9+). MIT license.

## Support
If it is useful, you can donate: https://paypal.me/RafalBaranowski
