We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running nx format:check parses all files, even the ones that are excluded via .gitignore / .nxignore.
nx format:check
Ignored files should not be parsed by format:check
format:check
No response
do_not_check.mjs
.nxignore
nx forrmat:check
Node : 18.16.1 OS : darwin-arm64 yarn : 3.6.1 nx : 16.6.0 @nx/js : 16.6.0 @nx/linter : 16.6.0 @nx/workspace : 16.6.0 @nx/cypress : 16.6.0 @nx/devkit : 16.6.0 @nx/eslint-plugin : 16.6.0 @nx/react : 16.6.0 @nx/rollup : 16.6.0 @nx/vite : 16.6.0 @nx/web : 16.6.0 typescript : 5.1.6 ---------------------------------------
Format is not filtering out ignored files in the patterns array:
patterns
https://github.com/nrwl/nx/blob/master/packages/nx/src/command-line/format/format.ts#L91
It can be easily fixed by adding the following:
import {getIgnoreObject} from "../../utils/ignore"; ... const nonIgnoredPatterns = getIgnoreObject().filter(patterns);
I'd create a PR but I am not sure this is the best way to fix the issue. Let me know.
The text was updated successfully, but these errors were encountered:
Sure, please open a PR. 🙏
Sorry, something went wrong.
fix(misc): format must exclude ignored patterns (nrwl#18568)
6785ef8
`nx format` commands will now correctly ignore patterns defined in `.gitignore` or `.nxignore`
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Successfully merging a pull request may close this issue.
Current Behavior
Running
nx format:check
parses all files, even the ones that are excluded via .gitignore / .nxignore.Expected Behavior
Ignored files should not be parsed by
format:check
GitHub Repo
No response
Steps to Reproduce
do_not_check.mjs
with some random text inside.nxignore
nx forrmat:check
Nx Report
Failure Logs
No response
Operating System
Additional Information
Format is not filtering out ignored files in the
patterns
array:https://github.com/nrwl/nx/blob/master/packages/nx/src/command-line/format/format.ts#L91
It can be easily fixed by adding the following:
I'd create a PR but I am not sure this is the best way to fix the issue. Let me know.
The text was updated successfully, but these errors were encountered: