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

ci(prettier): show diff if prettier made changes #30798

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

Finkregh
Copy link
Contributor

The normal output is not helpful, see also: prettier/prettier#6885

Changes

Linting with prettier now shows a diff if there are changes. This makes it easier to see what changes it actually want (not only the file names as before).

Context

https://github.com/renovatebot/renovate/actions/runs/10395128990/job/28798791562?pr=30680
Output here does not really help.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@Finkregh Finkregh marked this pull request as ready for review August 15, 2024 11:23
@secustor
Copy link
Collaborator

Is there a reason you can not simply run lint-fix or prettier-fix ?

@Finkregh
Copy link
Contributor Author

Is there a reason you can not simply run lint-fix or prettier-fix ?

Does that show a diff? Or does it push changes back into PR? I'd be fine with either one :)

@secustor
Copy link
Collaborator

This is run locally to fix such issues automatically and should be then commited by the dev.
See this section of the local development guide: https://github.com/renovatebot/renovate/blob/main/docs/development/local-development.md#linting-and-formatting

@Finkregh
Copy link
Contributor Author

Finkregh commented Aug 17, 2024

It would still be nice if the CI would show me what should be changed, not everyone is ~willing/~able to setup that quite huge development environment :)

What do you think about adding a link to the dev-docs if prettier fails? @secustor

@rarkins
Copy link
Collaborator

rarkins commented Aug 18, 2024

@Finkregh what's the problem you're trying to solve?

e.g you submit a PR which has prettier problems, and it fails on CI, and you want more details?

I don't object to this, but the "next step" will still be to run pnpm prettier-fix. Instead do you plan to fix prettier problems by hand using the diff?

@Finkregh
Copy link
Contributor Author

@rarkins yes, exactly. Make it at least an option to see what the files should look like :)

@rarkins
Copy link
Collaborator

rarkins commented Aug 19, 2024

Seems ok for me for those who want to contribute via the GitHub UI and not Codespaces or locally. @secustor wdyt?

@secustor
Copy link
Collaborator

Fine by me, though not sure if this will really be that helpful as Github UI messes with whitespace in the Actions UI as far as I know.

@rarkins rarkins added this pull request to the merge queue Aug 19, 2024
Merged via the queue into renovatebot:main with commit 463f8f2 Aug 19, 2024
55 checks passed
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 38.41.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Finkregh Finkregh deleted the patch-2 branch August 20, 2024 10:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants