1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 14:27:50 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Martin Geisler
c4ce2ab8a9
Format Python files with YAPF (#1360) 2023-10-18 13:56:05 -04:00
Martin Geisler
4560ee8484
Format all PO files with dprint (#1359)
This enforces a consistent formatting for the PO files. The goal of this
is to avoid large diffs due to random and unnecessary reformatting.

We use the format of `msgcat`: this is also waht `msgmerge` produces and
it’s easy to replicate for people by installing Gettext and running
`dprint fmt`.

This is a follow-up to #1351 which started enforcing that the `msgid`
fields don’t change due to reformatting in a PR.

If this turns out to be cumbersome, then we can disable it again.
2023-10-14 12:53:18 +02:00
Martin Geisler
692e4b09c8
Update dprint config (#1354)
The new version of the Markdown plugin has the fix for
https://github.com/dprint/dprint-plugin-markdown/issues/87.

Fixes #1308.
2023-10-12 21:30:49 +02:00
Martin Geisler
42541fc401
Automatically format YAML, CSS, and JS files (#1272)
Initially, I also formatted the templates in `theme/`, but this triggers
https://github.com/prettier/prettier/issues/11834. So I exclude them for
now.

---------

Co-authored-by: Ming-Ying Chung <mych@chromium.org>
2023-10-02 14:48:00 +09:00
Martin Geisler
81e30daf66
Run dprint config update (#1273)
This updates the plugins to the latest version.
2023-09-28 22:52:00 +02:00
Martin Geisler
f04dd2e87e
Update exec plugin to latest version (#1046)
The latest version of `dprint` doesn't work with our old version of the `exec` plugin. This fixes the config based on https://github.com/dprint/dprint/issues/726.
2023-08-02 10:30:43 +01:00
Martin Geisler
ccde0db38c
Exclude book/ directory from auto-formatting (#852)
The directory contains generated files and should be ignored when
reformatting.
2023-06-22 10:13:53 -04:00
Martin Geisler
aaca44f62b
Format files with dprint (#711)
The dprint formatter is a flexible system which will use sandboxed
WebAssembly formatters to format our code (mostly: it calls out to
`rustfmt` for Rust code).

A particularly interesting feature is that dprint can format Rust code
blocks in the Markdown files. However, before we turn that on, we need
to have a way to normalize the Markdown text as it is extracted[1].
That is so that the word put into the translations is kept after the
reformatting.

[1]: https://github.com/google/mdbook-i18n-helpers/issues/19
2023-05-30 17:04:19 +02:00