miniscule: fix edition fmt (#5167)

* miniscule: fix edition fmt

* fix: rust analyzer might enable this and hence cause red squiggles

Reduce the visual overload.

* fix/spellcheck/quirk: allow 124_123 numbers
This commit is contained in:
Bernhard Schuster
2022-03-21 14:00:59 +01:00
committed by GitHub
parent 189dfdc006
commit 0e34a8080f
3 changed files with 20 additions and 5 deletions
+4 -1
View File
@@ -67,7 +67,10 @@ pub(crate) fn gum(item: proc_macro::TokenStream, level: Level) -> proc_macro::To
let res = expander::Expander::new("gum")
.add_comment("Generated overseer code by `gum::warn!(..)`".to_owned())
.dry(!cfg!(feature = "expand"))
// `dry=true` until rust-analyzer can selectively disable features so it's
// not all red squiggles. Originally: `!cfg!(feature = "expand")`
// ISSUE: <https://github.com/rust-analyzer/rust-analyzer/issues/11777>
.dry(true)
.verbose(false)
.fmt(expander::Edition::_2021)
.maybe_write_to_out_dir(impl_gum2(item, level))
@@ -102,7 +102,7 @@ pub(crate) fn impl_overseer_gen(
.add_comment("Generated overseer code by `#[overlord(..)]`".to_owned())
.dry(!cfg!(feature = "expand"))
.verbose(false)
.fmt(expander::Edition::_2018)
.fmt(expander::Edition::_2021)
.write_to_out_dir(additive)
.expect("Expander does not fail due to IO in OUT_DIR. qed");
+15 -3
View File
@@ -6,10 +6,22 @@ skip_os_lookups = true
use_builtin = true
[hunspell.quirks]
# `Type`'s
# 5x
# He tagged it as 'TheGreatestOfAllTimes'
transform_regex = [
# `Type`'s
"^'([^\\s])'$",
# 5x
# 10.7%
"^[0-9_]+(?:\\.[0-9]*)?(x|%)$",
# Transforms'
transform_regex = ["^'([^\\s])'$", "^[0-9]+(?:\\.[0-9]*)?(x|%)$", "^(.*)'$", "^\\+$", "^[0-9]*+k|MB|Mb|ms|Mbit|nd|th|rd$", "^=|>|<|%$"]
"^(.*)'$",
# backslashes
"^\\+$",
"^[0-9]*+k|MB|Mb|ms|Mbit|nd|th|rd$",
# single char `=` `>` `%` ..
"^=|>|<|%$",
# 22_100
"^(?:[0-9]+_)+[0-9]+$"
]
allow_concatenation = true
allow_dashes = true