Skip to content
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

--cache-location is an unknown option #624

Closed
patricklafrance opened this issue May 6, 2024 · 2 comments
Closed

--cache-location is an unknown option #624

patricklafrance opened this issue May 6, 2024 · 2 comments
Labels
regression Something is no longer working

Comments

@patricklafrance
Copy link

patricklafrance commented May 6, 2024

According to knip documentation --cache-location is a valid option of the CLI. Whenever I try to specify the cache option:

knip --cache --cache-location .cache/knip

I get the following error:

Unknown option '--cache-location'                                                                                                                                         
│ ✂️  Find unused files, dependencies and exports in your JavaScript and TypeScript projects
│ Usage: knip [options]
│ Options:
│   -c, --config [file]      Configuration file path (default: [.]knip.json[c], knip.js, knip.ts or package.json#knip)
│   -t, --tsConfig [file]    TypeScript configuration path (default: tsconfig.json)
│   --production             Analyze only production source files (e.g. no test files, devDependencies)
│   --strict                 Consider only direct dependencies of workspace (not devDependencies, not other workspaces)
│   -W, --workspace [dir]    Analyze a single workspace (default: analyze all configured workspaces)
│   --directory [dir]        Run process from a different directory (default: cwd)
│   --cache                  Enable caching
│   --cache-location         Change cache location (default: node_modules/.cache/knip)                                                                                      
│   --watch                  Watch mode                                                                                                                                     
│   --no-gitignore           Don't use .gitignore                                                                                                                           
│   --include                Report only provided issue type(s), can be comma-separated or repeated (1)
│   --exclude                Exclude provided issue type(s) from report, can be comma-separated or repeated (1)
│   --dependencies           Shortcut for --include dependencies,unlisted,binaries,unresolved
│   --exports                Shortcut for --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates
│   --files                  Shortcut for --include files
│   --fix                    Fix issues
│   --fix-type               Fix only issues of type, can be comma-separated or repeated (2)
│   --allow-remove-files     Allow Knip to remove files (with --fix)
│   --include-libs           Include type definitions from dependencies (default: false; implied with classMembers)
│   --include-entry-exports  Include entry files when reporting unused exports
│   --isolate-workspaces     Isolate workspaces into separate programs
│   -n, --no-progress        Don't show dynamic progress updates (automatically enabled in CI environments)
│   --preprocessor           Preprocess the results before providing it to the reporter(s), can be repeated
│   --preprocessor-options   Pass extra options to the preprocessor (as JSON string, see --reporter-options example)
│   --reporter               Select reporter: symbols, compact, codeowners, json, can be repeated (default: symbols)
│   --reporter-options       Pass extra options to the reporter (as JSON string, see example)
│   --tags                   Include or exclude tagged exports
│   --no-config-hints        Suppress configuration hints
│   --no-exit-code           Always exit with code zero (0)
│   --max-issues             Maximum number of issues before non-zero exit code (default: 0)
│   -d, --debug              Show debug output
│   --performance            Measure count and running time of expensive functions and display stats table
│   -h, --help               Print this help text
│   -V, --version            Print version
│ (1) Issue types: files, dependencies, unlisted, unresolved, exports, nsExports, classMembers, types, nsTypes, enumMembers, duplicates
│ (2) Fixable issue types: dependencies, exports, types
│ Examples:
│ $ knip
│ $ knip --production
│ $ knip --workspace packages/client --include files,dependencies
│ $ knip -c ./config/knip.json --reporter compact
│ $ knip --reporter codeowners --reporter-options '{"path":".github/CODEOWNERS"}'
│ $ knip --tags=-knipignore
│ Website: https://knip.dev

I am using:

  • knip 5.12.2
  • on Windows 11

Thank you,

Patrick

@patricklafrance patricklafrance added the regression Something is no longer working label May 6, 2024
@webpro
Copy link
Collaborator

webpro commented May 6, 2024

🚀 This issue has been resolved in v5.12.3. See Release 5.12.3 for release notes.

Using Knip in a commercial project? Please consider sponsoring me.

@webpro webpro closed this as completed in 6481d12 May 6, 2024
@webpro
Copy link
Collaborator

webpro commented May 6, 2024

Thanks @patricklafrance! Should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Something is no longer working
Projects
None yet
Development

No branches or pull requests

2 participants