question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
SimenBcommented, Jan 27, 2019
1reaction
DSchaucommented, Feb 3, 2019

It has been! Working great for us on Gatsby!

Thank you!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CI/CD pipeline - get list of changed files - GitLab Forum
Hi folks, On my Gitlab CI/CD pipeline, is there a way I can get a list of the ... I'd like to lint...
Read more >
How to list only the names of files that changed between two ...
git diff --name-only SHA1 SHA2. where you only need to include enough of the SHA hash to identify the commits. You can also...
Read more >
CLI - Prettier
This command formats all files supported by Prettier in the current directory and its ... you can use --list-different flag instead of --check...
Read more >
Review changes | WebStorm Documentation - JetBrains
Go To Changed File Ctrl+N. Display all changed files in the current change set and navigate to them. This action is only available...
Read more >
How to List All the Files in a Git Commit - W3docs
Using git diff to list all the changed files between two commits ... Use --name-status argument instead to see what happened to each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found