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

fix(cli): skip files outside the current directory when using --changed #2319

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

castarco
Copy link
Contributor

@castarco castarco commented Apr 5, 2024

Summary

When running lint, check or format with the flag --changed, ensure that files outside the current directory are filtered out before processing them.

Fixes #1996 .

Test Plan

  • Tested it manually at different nested directory levels (including the "root" directory).
  • Note that it is difficult to introduce an automated regression test without big changes because the memory filesystem used in tests doesn't allow us to check if the flags we pass to git are correct or not.

When running `lint`, `check` or `format` with the flag `--changed`,
ensure that files outside the current directory are filtered out before
processing them.

Signed-off-by: Andres Correa Casablanca <andreu@kindspells.dev>
@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Website Area: website A-Changelog Area: changelog labels Apr 5, 2024
Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 1f7ec51
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/660fc4d2a715300008e9e214
😎 Deploy Preview https://deploy-preview-2319--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🔴 down 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@castarco castarco changed the title fix: issue #1996 fix(cli): skip files outside the current directory when using --changed Apr 5, 2024
Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix!

@ematipico ematipico merged commit 343b658 into biomejs:main Apr 5, 2024
15 checks passed
@castarco castarco deleted the fix-issue-1996 branch April 5, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-CLI Area: CLI A-Core Area: core A-Website Area: website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 --changed in monorepos throws No such file or directory (os error 2)
3 participants