-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add positional path arguments for single-file/directory targeting #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
50390d8
chore: update package-lock
CodeDeficient a6e6853
1.0.21
CodeDeficient 0912690
feat: add fresh_package_version detection to flag npm packages update…
CodeDeficient bc0dc4b
1.0.22
CodeDeficient 51db9ef
1.0.23
CodeDeficient 19c92fa
fix: use karpeslop-cli.js as bin entry point
CodeDeficient ae8b116
1.0.24
CodeDeficient 846dacd
docs: add CHANGELOG.md
CodeDeficient dc07a70
1.0.25
CodeDeficient 76a3d6f
feat: add positional path arguments for single-file/directory targeting
CodeDeficient 692da31
fix: share glob ignore list between findAllFiles and resolveTargetPat…
CodeDeficient 1b30e81
fix: simplify isExcludedPath with De Morgan's, add missing exclusion …
CodeDeficient 82c8e32
fix: dotfile exclusion covers nested paths, add isExcludedPath check …
CodeDeficient f4a15cf
fix: add includes('types/') to match generated/ exclusion pattern
CodeDeficient 7db3f3f
fix: use segment-based check for types/ exclusion to avoid substring …
CodeDeficient a390199
fix: remove now-redundant types/ substring checks
CodeDeficient 6f3f093
fix: address PR #15 review findings
CodeDeficient 8ad6176
merge: resolve main into branch + address PR review comments
CodeDeficient 7a3924c
fix: address new CodeRabbit review comments
CodeDeficient a7bfa78
fix: address new code review findings (perf, caching, error handling)
CodeDeficient 0b156cf
fix: tighten package age scanning
CodeDeficient 4937743
fix: include workspace manifests in scans
CodeDeficient a86c719
fix: scope manifest dedupe and wrapper exits
CodeDeficient 04f3ea1
fix: preserve lockfile entry identity
CodeDeficient 74a5e14
fix: honor ignore paths for explicit targets
CodeDeficient 8f6af27
fix: honor ignore globs and empty scans
CodeDeficient b1199cd
fix: support legacy lockfiles in freshness scan
CodeDeficient 22c1a35
fix: tighten package freshness scans
CodeDeficient 89b0de9
fix: tighten quiet and freshness handling
CodeDeficient d0314a5
fix: ignore workspace lockfile entries
CodeDeficient 1027563
test: add mock-free behavior coverage
CodeDeficient cbd5e42
test: add mock-free behavior coverage for --strict, -- separator, seg…
CodeDeficient 18bedd8
fix: use path.basename instead of endsWith for manifest file detection
CodeDeficient 1fee7b4
fix: exit 0 when only fresh-package warnings found, matching banner m…
CodeDeficient 6d50505
fix: skip null package entries in lockfile v3 to prevent silent analy…
CodeDeficient b1f1379
fix: escape glob-special characters in isIgnoredByConfig to prevent l…
CodeDeficient 272a41b
fix: remove dead branch in generateReport (issues.length === 0 after …
CodeDeficient 109d468
chore: remove karpeslop-bin.js and karpeslop.js from package and git …
CodeDeficient cc3f0c4
fix: resolve tsx from package deps instead of hardcoded .bin path; up…
CodeDeficient File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| node_modules/ | ||
| dist/ | ||
| karpeslop-bin.js | ||
| .npmignore | ||
| .ai-slop-report.json | ||
| .DS_Store | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes will be documented in this file. | ||
|
|
||
| ## [1.0.25] - 2026-06-09 | ||
|
|
||
| ### Added | ||
| - **Positional path arguments**: `karpeslop [options] [path...]` accepts file or directory targets so scans can focus on a single file or subset. The `--strict` mode now reports which targeted file(s) had critical issues. | ||
| - **`--` separator**: Use `--` to mark the end of flags, so paths starting with `-` aren't misclassified as flags. | ||
| - **Manifest file discovery**: `findAllFiles()` now picks up `package.json`/`package-lock.json` at the project root, and `resolveTargetPaths()` accepts `.json` for the two manifest filenames — making the `fresh_package_version` rule reachable from both full and targeted scans. | ||
| - **`--quiet` includes manifests**: Even with `--quiet`, the two manifest files are still analyzed so package freshness warnings aren't lost. | ||
|
|
||
| ### Fixed | ||
| - **package-lock.json bin entry**: Aligned to `karpeslop-cli.js` (matching `package.json`). | ||
| - **Published CLI wrapper**: `karpeslop-cli.js` now resolves `tsx` from the package dependency graph instead of assuming a package-local `.bin/tsx` path, so normal installs no longer print an `ENOENT` before startup. | ||
| - **Config validation**: `minPackageAgeDays` now rejects non-finite/negative values at load time instead of silently producing NaN. | ||
| - **Exit code docs**: Help text and `README.md` now document that `fresh_package_version` findings are informational and exit with code `0` when they are the only issues. | ||
|
|
||
| ### Refactored | ||
| - Shared `getGlobIgnorePatterns()` and `isExcludedPath()` between `findAllFiles()` and `resolveTargetPaths()` so both paths use the same exclusion logic. | ||
| - `isExcludedPath` flattened with De Morgan's law; segment-based check for dotfiles and `types/`. | ||
|
|
||
| ## [1.0.24] - 2026-04-04 | ||
|
|
||
| ### Fixed | ||
| - **Bin entry point**: `karpeslop-cli.js` is now correctly registered as the CLI binary, fixing `npx karpeslop` execution errors | ||
|
|
||
| ### Fixed (from PR #9) | ||
| - **isInTryCatchBlock**: Complete rewrite with proper nested depth tracking and catch scope detection | ||
| - **overconfident_comment**: Removed incorrect skip logic that was causing false negatives on lines starting with `//` | ||
| - **missing_error_handling**: Added word boundary anchors and comment-line skipping | ||
| - **todo_comment**: Added word boundary so `BUG` doesn't match inside `DEBUG` | ||
| - **unsafe_double_type_assertion**: Added comment-line skip and English phrase detection | ||
| - **production_console_log**: Added conditional guard detection to reduce false positives | ||
| - **overconfident_comment regex**: Changed from `/\/\/\s*.../` to `/\/\/.*.../` to match "This is obviously wrong" | ||
| - **magic_css_value**: Removed leading word boundary from hex color pattern | ||
|
|
||
| ### Added | ||
| - **fresh_package_version detection**: New rule to flag npm packages in `package.json` or `package-lock.json` that use `^`/`~` with versions published less than 7 days ago. Configurable via `minPackageAgeDays` in `.karpesloprc.json`. | ||
|
|
||
| ## [1.0.21] - 2026-04-04 | ||
|
|
||
| ### Initial Release | ||
| - Initial npm release of KarpeSlop AI slop detector | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.