Repository navigation
Releases
Releases · Rajan694/clean-push
v1.0.0
Added
- Checks the lines you added for leftovers after every save and every Git change (commit, stage, checkout, pull), and shows them as squiggles, scrollbar marks and Problems panel entries (source
clean-push); F8 steps through them. - Rules:
console(console.log, .debug, .info, .trace, .dir, .table; .warn and .error are in the ignore list by default),debugger(JavaScript, Python, Ruby),focused-test(.only(,fit(,fdescribe(in test files),conflict-markerandtodo(new TODO / FIXME / HACK / XXX comments). Comments and strings are skipped where that makes sense. - Settings:
cleanPush.scope(unpushedfalls back touncommittedwhen the branch has no upstream),cleanPush.rules,cleanPush.ignoreList,cleanPush.exclude,cleanPush.largeFileKBandcleanPush.ignoreComment(// leftover-ignore). - Commands: Clean Push: Refresh and Clean Push: Change Scope.
- Leftovers section in Source Control, under Git's Changes list: one row per file with its count and folder, colored by its most severe leftover, a hover summary ("api.ts — 3 leftovers: 1 console.log, 1 debugger, 1 new TODO") and a Go to First Leftover button. Each leftover row shows the line with the leftover highlighted; clicking it opens the file at that line. The title shows the total, and the section hides itself when there are no leftovers.
- Status bar item ("⚠ 4 leftovers") that opens the Leftovers section.
- Quick fixes (lightbulb): Remove console.log / Remove debugger / Remove .only / Change fit to it, Ignore this line (adds
// leftover-ignorein the file's comment syntax) and Remove all leftovers in this file. A removal is offered only when the leftover is a whole statement, soconst x = console.log(y)orif (a) console.log(x)are never broken; multi-line calls are removed whole, and a Python block that would be left empty getspass. - Fix All Leftovers in File button on Leftovers rows that have something to fix. It saves the file afterwards if it had no unsaved changes.
- Gutter icon and a faint line background on lines with leftovers (colors
cleanPush.errorLineBackgroundandcleanPush.warningLineBackgroundcan be themed). - Files with leftovers are colored in the Explorer and editor tabs, with a count badge (
cleanPush.decorateExplorer). - Rule
secret(error): AWS access keys, GitHub, Slack, Stripe live, Google, OpenAI and Anthropic tokens, private key headers, and hard-coded values for names such asapiKey,passwordorclient_secret(quoted in code, also unquoted in.env, YAML, INI, TOML and shell files). Placeholders such as"your-key-here","${VAR}"or"xxxx"are not flagged. - Rule
print(warning):print(/pprint(in Python,System.out.println/printf,fmt.Printlnand Go'sprintln, Rust'sdbg!, PHP'svar_dump,print_randdd(; removable with the same quick fix asconsole. - Rule
env-file(error): a changed.envfile that git doesn't ignore (.env.example,.env.sampleand similar are fine). - Rule
large-file(warning): an added file bigger thancleanPush.largeFileKB, binary files included. - Add to .gitignore quick fix and Leftovers-row menu item for
env-fileandlarge-file; if git already tracks the file it offers to stop tracking it (git rm --cached). cleanPush.customRules: your own regex rules, with languages, severity and message.- Clean Push: Install Git Pre-push Hook / Uninstall Git Pre-push Hook: an optional POSIX
shhook that blocks a push whose new commits add conflict markers,.only(, a baredebugger, a private key or an AWS access key, naming the file and line. It never overwrites another hook; withcore.hooksPathset (Husky, lefthook) it shows the lines to add to your own hook instead.
v0.1.0
- Project setup: TypeScript + esbuild build, tests, packaging and release scripts.