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

Support working-directory keyword in GitHub Actions workflows #433

Open
auvred opened this issue Jan 6, 2024 · 1 comment
Open

Support working-directory keyword in GitHub Actions workflows #433

auvred opened this issue Jan 6, 2024 · 1 comment
Labels
feature request Feature request

Comments

@auvred
Copy link
Contributor

auvred commented Jan 6, 2024

Followup for #432

I'm working on integrating knip into the typescript-eslint repo (typescript-eslint/typescript-eslint#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)

@webpro
Copy link
Owner

webpro commented Jan 8, 2024

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 stylelint to the root workspace devDependencies
  • Add stylelint to ignoreDependencies for 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants