Support `working-directory` keyword in GitHub Actions workflows
Followup for https://github.com/webpro/knip/pull/432
I'm working on integrating knip into the typescript-eslint repo (https://github.com/typescript-eslint/typescript-eslint/pull/8192)
We have GH workflow step that runs in the specified working-directory. Unfortunatelly, knip doesn't understand this syntax right now and reports stylelint as unused binary
Unlisted binaries (1)
stylelint .github/workflows/ci.yml
GitHub Docs: Workflow syntax for GitHub Actions
I thought about sending a PR, but I couldn't find an example in the code of existing plugins on how to handle similar situtations (monorepo dependency is referenced by file from repository root)
This is a totally valid bug report, but currently a non-trivial thing to handle in Knip.
Even if we'd take the working-directory into account to accomodate for something to run in another directory (which doesn't have to be another workspace), we'd need to understand this is in another workspace and "transfer" the stylelint dependency from the root workspace to the appropriate workspace.
For now the only suggestions I can do:
- Move or copy (depending on usage) the
stylelintto the root workspacedevDependencies - Add
stylelinttoignoreDependenciesfor the root workspace.
I really value this feedback, as it enforces the idea that some generic improvements need to be made in the capabilities of core and plugins. But there are other areas I consider higher priority at the moment. Let's just keep this issue open for visbility.
Going to reject this one, since it does not match what Knip currently offers, and we don't have the bandwidth/resources to implement RFCs like this.