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

format:check command doesn't check all files if check fails within first 50 affected files #9151

Closed
miluoshi opened this issue Mar 1, 2022 · 2 comments · Fixed by #9152
Closed

Comments

@miluoshi
Copy link
Contributor

miluoshi commented Mar 1, 2022

While running format:write and format:check commands, a list of affected files is split to chunks of 50 files, that was originally meant as compatibility optimization for Windows users (see #2362).
This causes early exits in cases if there are also incorrectly formatted files in both 1st and following chunks.

Current Behavior

  • have >50 files affected by your changes
  • have at least 1 file within 1st chunk of 50 files incorrectly formatted AND at least 1 file in the 2nd chunk
  • nx format:check will exit after checking 1st chunk and will not print incorrectly formatted files in the following chunks
  • nx format:write works correctly and writes all affected files

Expected Behavior

  • nx format:check should check and print incorrectly formatted files among all affected files, not only first incorrect chunk

Steps to Reproduce

See Current Behavior section

Environment

Click to expand!
>  NX   Report complete - copy this into the issue template

   Node : 16.13.2
   OS   : darwin x64
   yarn : 1.22.17
   
   nx : 13.8.1
   @nrwl/angular : 13.8.1
   @nrwl/cli : 13.8.1
   @nrwl/cypress : 13.8.1
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.1
   @nrwl/eslint-plugin-nx : 13.8.1
   @nrwl/express : undefined
   @nrwl/jest : 13.8.1
   @nrwl/js : 13.8.1
   @nrwl/linter : 13.8.1
   @nrwl/nest : undefined
   @nrwl/next : undefined
   @nrwl/node : undefined
   @nrwl/nx-cloud : 13.1.4
   @nrwl/react : 13.8.1
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : 13.8.1
   @nrwl/tao : 13.8.1
   @nrwl/web : 13.8.1
   @nrwl/workspace : 13.8.1
   typescript : 4.5.5
   rxjs : 7.5.4
   ---------------------------------------
   Community plugins:
         @angular-builders/custom-webpack: 13.1.0
         @angular-devkit/build-angular: 13.2.3
         @angular/animations: 13.2.2
         @angular/cdk: 13.1.2
         @angular/cli: 13.2.3
         @angular/common: 13.2.2
         @angular/compiler: 13.2.2
         @angular/compiler-cli: 13.2.2
         @angular/core: 13.2.2
         @angular/elements: 13.2.2
         @angular/forms: 13.2.2
         @angular/language-service: 13.2.2
         @angular/material: 13.1.2
         @angular/material-moment-adapter: 13.1.2
         @angular/platform-browser: 13.2.2
         @angular/platform-browser-dynamic: 13.2.2
         @angular/router: 13.2.2
         @ngrx/component-store: 13.0.2
         @ngrx/effects: 13.0.2
         @ngrx/entity: 13.0.2
         @ngrx/schematics: 13.0.2
         @ngrx/store: 13.0.2
         @nx-tools/nx-docker: 1.0.5
         @storybook/angular: 6.4.18
@savvyshell
Copy link

I'm using npx prettier --check . to get a list of errors since nx format check lacks verbose info.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants