diff options
| author | bors <bors@rust-lang.org> | 2023-05-26 03:31:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-26 03:31:04 +0000 |
| commit | c86212f9bccb4d5ec625b0607053b067732724ab (patch) | |
| tree | a3e3bdc7cf3c53714f90ce3f4299a3536325c83c /compiler/rustc_interface/src/errors.rs | |
| parent | 0004b3b984b19646c1f78b09ba497b7bd6e882c1 (diff) | |
| parent | f97fddab91fbf290ea5b691fe355d6f915220b6e (diff) | |
| download | rust-c86212f9bccb4d5ec625b0607053b067732724ab.tar.gz rust-c86212f9bccb4d5ec625b0607053b067732724ab.zip | |
Auto merge of #111858 - clubby789:fluent-alphabetical, r=jyn514,compiler-errors
Ensure Fluent messages are in alphabetical order
Fixes #111847
This adds a tidy check to ensure Fluent messages are in alphabetical order, as well as sorting all existing messages. I think the error could be worded better, would appreciate suggestions.
<details>
<summary>Script used to sort files</summary>
```py
import sys
import re
fn = sys.argv[1]
with open(fn, 'r') as f:
data = f.read().split("\n")
chunks = []
cur = ""
for line in data:
if re.match(r"^([a-zA-Z0-9_]+)\s*=\s*", line):
chunks.append(cur)
cur = ""
cur += line + "\n"
chunks.append(cur)
chunks.sort()
with open(fn, 'w') as f:
f.write(''.join(chunks).strip("\n\n") + "\n")
```
</details>
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
