Skip to content

list-different (and check) log every file in CI, instead of just changed files #5801

@DSchau

Description

@DSchau

Environments:

  • Prettier Version: 1.16.1
  • Running Prettier via: CLI
  • Runtime: Node.js 10 (and probably every version)
  • Operating System: Linux

Steps to reproduce:

Expected behavior:

prettier --list-different (and prettier --check) should only log the different files in CI

Actual behavior:

prettier --list-different logs every file in a CI server, tested with TravisCI and CircleCI.

More information

Prettier v1.16.1 tweaked the behavior of --list-different (and additionally --check). It appears to now log all files that are being checked, rather than just the files that differ. In a local, non-CI environment this works well because the shell is wiped with each new file, and the end result ends up being just the files that are changed. In CI, this behavior is not present, and so the output becomes incredibly challenging to read and it's not clear which files are different and should be updated.

It appears that this PR may have been the cause of the regression, specifically with relying on only process.stdout.isTTY which seems to log every file being accessed in CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliIssues with Prettier's Command Line Interfacelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions