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

arguments to programs in GitHub Actions are incorrectly interpreted as dependencies #344

Closed
Zamiell opened this issue Nov 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Nov 10, 2023

This is on knip version 2.40.1.

Steps to reproduce:

git clone git@github.com:IsaacScript/isaacscript.git
cd isaacscript
git checkout aa5b9e68ca3ec147d0b87ec83da8bd8a536dcf61
yarn
npx knip

Part of the output is as follows:

Unlisted dependencies (4)
build                      .github/workflows/ci.yml
lint                       .github/workflows/ci.yml
test                       .github/workflows/ci.yml

This is a false positive. I believe that Knip is listing this because of the following line in my "ci.yml" file:

      - run: npx tsx ./scripts/getMonorepoPackageNames.ts build

Here, we provide a command-line positional argument to the "getMonorepoPackageNames.ts" script, to let it know that it should only give us the monorepo package names that contain a "build" script. But Knip seems to interpret this as "build" being some kind of dependency for some reason.

@Zamiell Zamiell added the bug Something isn't working label Nov 10, 2023
@webpro
Copy link
Member

webpro commented Nov 11, 2023

Thanks for reporting this, I think Knip can handle tsx just like the node executable and this problem should go away.

@webpro webpro closed this as completed in 0451e23 Nov 11, 2023
@webpro
Copy link
Member

webpro commented Nov 11, 2023

🚀 This issue has been resolved in v2.41.0. See Release 2.41.0 for release notes.

@Zamiell
Copy link
Contributor Author

Zamiell commented Nov 11, 2023

Awesome, thank you webpro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants