typos 1.37.3__tar.gz → 1.38.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of typos might be problematic. Click here for more details.
- {typos-1.37.3 → typos-1.38.0}/Cargo.lock +4 -2
- {typos-1.37.3 → typos-1.38.0}/PKG-INFO +1 -1
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/Cargo.toml +2 -2
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/bin/typos-cli/args.rs +1 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/config.rs +65 -65
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/default_types.rs +17 -10
- {typos-1.37.3 → typos-1.38.0}/crates/typos-dict/Cargo.toml +1 -1
- {typos-1.37.3 → typos-1.38.0}/crates/typos-dict/src/word_codegen.rs +150382 -150383
- {typos-1.37.3 → typos-1.38.0}/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/aho_corasick.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/gen.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/insensitive.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/map.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/match.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/ordered_map.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/dictgen/src/trie.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/src/check.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/src/dict.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos/src/tokens.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/bin/typos-cli/main.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/bin/typos-cli/report.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/dict.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/file.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/file_type.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/file_type_specifics.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/policy.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/src/report.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/tests/cmd/en-us.in/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/tests/cmd/false-positives.in/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-cli/tests/cmd/filename-typo.in/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-dict/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-dict/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-vars/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-vars/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-vars/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/typos-vars/src/vars_codegen.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon/src/codegen.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon-core/Cargo.toml +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon-core/README.md +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon-core/src/borrowed.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon-core/src/lib.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/crates/varcon-core/src/parser.rs +0 -0
- {typos-1.37.3 → typos-1.38.0}/pyproject.toml +0 -0
|
@@ -1314,6 +1314,8 @@ dependencies = [
|
|
|
1314
1314
|
"libc",
|
|
1315
1315
|
"normalize-line-endings",
|
|
1316
1316
|
"os_pipe",
|
|
1317
|
+
"serde",
|
|
1318
|
+
"serde_json",
|
|
1317
1319
|
"similar",
|
|
1318
1320
|
"snapbox-macros",
|
|
1319
1321
|
"tempfile",
|
|
@@ -1591,7 +1593,7 @@ dependencies = [
|
|
|
1591
1593
|
|
|
1592
1594
|
[[package]]
|
|
1593
1595
|
name = "typos-cli"
|
|
1594
|
-
version = "1.
|
|
1596
|
+
version = "1.38.0"
|
|
1595
1597
|
dependencies = [
|
|
1596
1598
|
"ahash",
|
|
1597
1599
|
"annotate-snippets",
|
|
@@ -1640,7 +1642,7 @@ dependencies = [
|
|
|
1640
1642
|
|
|
1641
1643
|
[[package]]
|
|
1642
1644
|
name = "typos-dict"
|
|
1643
|
-
version = "0.13.
|
|
1645
|
+
version = "0.13.9"
|
|
1644
1646
|
dependencies = [
|
|
1645
1647
|
"codegenrs",
|
|
1646
1648
|
"csv",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "typos-cli"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.38.0"
|
|
4
4
|
description = "Source Code Spelling Correction"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
categories = ["development-tools", "text-processing"]
|
|
@@ -84,7 +84,7 @@ supports-unicode = "3.0.0"
|
|
|
84
84
|
assert_fs = "1.1"
|
|
85
85
|
divan = "0.1.21"
|
|
86
86
|
maplit = "1.0"
|
|
87
|
-
snapbox = "0.6.21"
|
|
87
|
+
snapbox = { version = "0.6.21", features = ["json"] }
|
|
88
88
|
trycmd = "0.15.10"
|
|
89
89
|
|
|
90
90
|
[[bench]]
|
|
@@ -17,7 +17,7 @@ pub const SUPPORTED_FILE_NAMES: &[&str] = &[
|
|
|
17
17
|
const CARGO_TOML: &str = "Cargo.toml";
|
|
18
18
|
const PYPROJECT_TOML: &str = "pyproject.toml";
|
|
19
19
|
|
|
20
|
-
#[derive(Debug, Clone, Default,
|
|
20
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
21
21
|
#[serde(deny_unknown_fields)]
|
|
22
22
|
#[serde(default)]
|
|
23
23
|
#[serde(rename_all = "kebab-case")]
|
|
@@ -31,7 +31,7 @@ pub struct Config {
|
|
|
31
31
|
pub overrides: EngineConfig,
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
#[derive(Debug, Clone, Default,
|
|
34
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
35
35
|
#[serde(default)]
|
|
36
36
|
#[serde(rename_all = "kebab-case")]
|
|
37
37
|
pub struct CargoTomlConfig {
|
|
@@ -39,28 +39,28 @@ pub struct CargoTomlConfig {
|
|
|
39
39
|
pub package: Option<CargoTomlPackage>,
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
#[derive(Debug, Clone, Default,
|
|
42
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
43
43
|
#[serde(default)]
|
|
44
44
|
#[serde(rename_all = "kebab-case")]
|
|
45
45
|
pub struct CargoTomlPackage {
|
|
46
46
|
pub metadata: CargoTomlMetadata,
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
#[derive(Debug, Clone, Default,
|
|
49
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
50
50
|
#[serde(default)]
|
|
51
51
|
#[serde(rename_all = "kebab-case")]
|
|
52
52
|
pub struct CargoTomlMetadata {
|
|
53
53
|
pub typos: Option<Config>,
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
#[derive(Debug, Clone, Default,
|
|
56
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
57
57
|
#[serde(default)]
|
|
58
58
|
#[serde(rename_all = "kebab-case")]
|
|
59
59
|
pub struct PyprojectTomlConfig {
|
|
60
60
|
pub tool: PyprojectTomlTool,
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
#[derive(Debug, Clone, Default,
|
|
63
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
64
64
|
#[serde(default)]
|
|
65
65
|
#[serde(rename_all = "kebab-case")]
|
|
66
66
|
pub struct PyprojectTomlTool {
|
|
@@ -88,7 +88,7 @@ impl Config {
|
|
|
88
88
|
)
|
|
89
89
|
})?;
|
|
90
90
|
|
|
91
|
-
if path.file_name().unwrap() == CARGO_TOML {
|
|
91
|
+
let config = if path.file_name().unwrap() == CARGO_TOML {
|
|
92
92
|
let config = toml::from_str::<CargoTomlConfig>(&s)?;
|
|
93
93
|
let typos = config
|
|
94
94
|
.workspace
|
|
@@ -96,27 +96,32 @@ impl Config {
|
|
|
96
96
|
.or(config.package.and_then(|p| p.metadata.typos));
|
|
97
97
|
|
|
98
98
|
if let Some(typos) = typos {
|
|
99
|
-
|
|
99
|
+
typos
|
|
100
100
|
} else {
|
|
101
101
|
log::debug!(
|
|
102
102
|
"No `package.metadata.typos` section found in `{CARGO_TOML}`, skipping"
|
|
103
103
|
);
|
|
104
104
|
|
|
105
|
-
Ok(None)
|
|
105
|
+
return Ok(None);
|
|
106
106
|
}
|
|
107
107
|
} else if path.file_name().unwrap() == PYPROJECT_TOML {
|
|
108
108
|
let config = toml::from_str::<PyprojectTomlConfig>(&s)?;
|
|
109
109
|
|
|
110
110
|
if let Some(typos) = config.tool.typos {
|
|
111
|
-
|
|
111
|
+
typos
|
|
112
112
|
} else {
|
|
113
113
|
log::debug!("No `tool.typos` section found in `{PYPROJECT_TOML}`, skipping");
|
|
114
114
|
|
|
115
|
-
Ok(None)
|
|
115
|
+
return Ok(None);
|
|
116
116
|
}
|
|
117
117
|
} else {
|
|
118
|
-
Self::from_toml(&s)
|
|
118
|
+
Self::from_toml(&s)?
|
|
119
|
+
};
|
|
120
|
+
if let Some(key) = config.unused().next() {
|
|
121
|
+
anyhow::bail!("unknown key `{key}`");
|
|
119
122
|
}
|
|
123
|
+
|
|
124
|
+
Ok(Some(config))
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
pub fn from_toml(data: &str) -> Result<Self, anyhow::Error> {
|
|
@@ -139,9 +144,22 @@ impl Config {
|
|
|
139
144
|
self.type_.update(&source.type_);
|
|
140
145
|
self.overrides.update(&source.overrides);
|
|
141
146
|
}
|
|
147
|
+
|
|
148
|
+
fn unused(&self) -> impl Iterator<Item = String> + '_ {
|
|
149
|
+
self.default
|
|
150
|
+
._unused
|
|
151
|
+
.keys()
|
|
152
|
+
.map(|k| format!("default.{k}"))
|
|
153
|
+
.chain(self.type_.patterns.iter().flat_map(|(name, glob)| {
|
|
154
|
+
glob.engine._unused.keys().map(|k| {
|
|
155
|
+
let name = name.clone();
|
|
156
|
+
format!("type.{name}.{k}")
|
|
157
|
+
})
|
|
158
|
+
}))
|
|
159
|
+
}
|
|
142
160
|
}
|
|
143
161
|
|
|
144
|
-
#[derive(Debug, Clone, Default,
|
|
162
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
145
163
|
#[serde(deny_unknown_fields)]
|
|
146
164
|
#[serde(default)]
|
|
147
165
|
#[serde(rename_all = "kebab-case")]
|
|
@@ -232,7 +250,7 @@ impl Walk {
|
|
|
232
250
|
}
|
|
233
251
|
}
|
|
234
252
|
|
|
235
|
-
#[derive(Debug, Clone, Default,
|
|
253
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
236
254
|
#[serde(deny_unknown_fields)]
|
|
237
255
|
#[serde(default)]
|
|
238
256
|
#[serde(transparent)]
|
|
@@ -306,7 +324,7 @@ impl TypeEngineConfig {
|
|
|
306
324
|
}
|
|
307
325
|
}
|
|
308
326
|
|
|
309
|
-
#[derive(Debug, Clone, Default,
|
|
327
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
310
328
|
//#[serde(deny_unknown_fields)] // Doesn't work with `flatten`
|
|
311
329
|
#[serde(default)]
|
|
312
330
|
#[serde(rename_all = "kebab-case")]
|
|
@@ -344,6 +362,9 @@ pub struct EngineConfig {
|
|
|
344
362
|
#[serde(with = "serde_regex")]
|
|
345
363
|
#[cfg_attr(feature = "unstable-schema", schemars(schema_with = "vec_string"))]
|
|
346
364
|
pub extend_ignore_re: Vec<regex::Regex>,
|
|
365
|
+
#[serde(flatten)]
|
|
366
|
+
#[cfg_attr(feature = "unstable-schema", schemars(skip))]
|
|
367
|
+
pub _unused: toml::Table,
|
|
347
368
|
}
|
|
348
369
|
|
|
349
370
|
impl EngineConfig {
|
|
@@ -356,6 +377,7 @@ impl EngineConfig {
|
|
|
356
377
|
tokenizer: TokenizerConfig::from_defaults(),
|
|
357
378
|
dict: DictConfig::from_defaults(),
|
|
358
379
|
extend_ignore_re: Default::default(),
|
|
380
|
+
_unused: Default::default(),
|
|
359
381
|
}
|
|
360
382
|
}
|
|
361
383
|
|
|
@@ -373,6 +395,7 @@ impl EngineConfig {
|
|
|
373
395
|
self.dict.update(&source.dict);
|
|
374
396
|
self.extend_ignore_re
|
|
375
397
|
.extend(source.extend_ignore_re.iter().cloned());
|
|
398
|
+
self._unused.extend(source._unused.clone());
|
|
376
399
|
}
|
|
377
400
|
|
|
378
401
|
pub fn binary(&self) -> bool {
|
|
@@ -392,24 +415,7 @@ impl EngineConfig {
|
|
|
392
415
|
}
|
|
393
416
|
}
|
|
394
417
|
|
|
395
|
-
|
|
396
|
-
fn eq(&self, rhs: &Self) -> bool {
|
|
397
|
-
self.binary == rhs.binary
|
|
398
|
-
&& self.check_filename == rhs.check_filename
|
|
399
|
-
&& self.check_file == rhs.check_file
|
|
400
|
-
&& self.tokenizer == rhs.tokenizer
|
|
401
|
-
&& self.dict == rhs.dict
|
|
402
|
-
&& self
|
|
403
|
-
.extend_ignore_re
|
|
404
|
-
.iter()
|
|
405
|
-
.map(|r| r.as_str())
|
|
406
|
-
.eq(rhs.extend_ignore_re.iter().map(|r| r.as_str()))
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
impl Eq for EngineConfig {}
|
|
411
|
-
|
|
412
|
-
#[derive(Debug, Clone, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
|
418
|
+
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
|
|
413
419
|
#[serde(deny_unknown_fields)]
|
|
414
420
|
#[serde(default)]
|
|
415
421
|
#[serde(rename_all = "kebab-case")]
|
|
@@ -556,27 +562,7 @@ fn find_project_files<'a>(
|
|
|
556
562
|
.filter(|path| path.exists())
|
|
557
563
|
}
|
|
558
564
|
|
|
559
|
-
|
|
560
|
-
fn eq(&self, rhs: &Self) -> bool {
|
|
561
|
-
self.locale == rhs.locale
|
|
562
|
-
&& self
|
|
563
|
-
.extend_ignore_identifiers_re
|
|
564
|
-
.iter()
|
|
565
|
-
.map(|r| r.as_str())
|
|
566
|
-
.eq(rhs.extend_ignore_identifiers_re.iter().map(|r| r.as_str()))
|
|
567
|
-
&& self.extend_identifiers == rhs.extend_identifiers
|
|
568
|
-
&& self
|
|
569
|
-
.extend_ignore_words_re
|
|
570
|
-
.iter()
|
|
571
|
-
.map(|r| r.as_str())
|
|
572
|
-
.eq(rhs.extend_ignore_words_re.iter().map(|r| r.as_str()))
|
|
573
|
-
&& self.extend_words == rhs.extend_words
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
impl Eq for DictConfig {}
|
|
578
|
-
|
|
579
|
-
#[derive(Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
|
565
|
+
#[derive(Debug, Copy, Clone, serde::Serialize, serde::Deserialize)]
|
|
580
566
|
#[serde(rename_all = "kebab-case")]
|
|
581
567
|
#[derive(Default)]
|
|
582
568
|
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
|
|
@@ -655,6 +641,8 @@ fn hashmap_string_t<T: schemars::JsonSchema>(
|
|
|
655
641
|
#[cfg(test)]
|
|
656
642
|
mod test {
|
|
657
643
|
use super::*;
|
|
644
|
+
use snapbox::assert_data_eq;
|
|
645
|
+
use snapbox::prelude::*;
|
|
658
646
|
|
|
659
647
|
#[cfg(feature = "unstable-schema")]
|
|
660
648
|
#[test]
|
|
@@ -668,11 +656,23 @@ mod test {
|
|
|
668
656
|
fn test_from_defaults() {
|
|
669
657
|
let null = Config::default();
|
|
670
658
|
let defaulted = Config::from_defaults();
|
|
671
|
-
assert_ne!(defaulted, null);
|
|
672
|
-
assert_ne!(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
659
|
+
assert_ne!(defaulted.clone().into_json(), null.clone().into_json());
|
|
660
|
+
assert_ne!(
|
|
661
|
+
defaulted.files.clone().into_json(),
|
|
662
|
+
null.files.clone().into_json()
|
|
663
|
+
);
|
|
664
|
+
assert_ne!(
|
|
665
|
+
defaulted.default.clone().into_json(),
|
|
666
|
+
null.default.clone().into_json()
|
|
667
|
+
);
|
|
668
|
+
assert_ne!(
|
|
669
|
+
defaulted.default.tokenizer.clone().into_json(),
|
|
670
|
+
null.default.tokenizer.clone().into_json()
|
|
671
|
+
);
|
|
672
|
+
assert_ne!(
|
|
673
|
+
defaulted.default.dict.clone().into_json(),
|
|
674
|
+
null.default.dict.clone().into_json()
|
|
675
|
+
);
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
#[test]
|
|
@@ -683,7 +683,7 @@ mod test {
|
|
|
683
683
|
let mut actual = defaulted.clone();
|
|
684
684
|
actual.update(&null);
|
|
685
685
|
|
|
686
|
-
|
|
686
|
+
assert_data_eq!(actual.into_json(), defaulted.into_json());
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
#[test]
|
|
@@ -694,7 +694,7 @@ mod test {
|
|
|
694
694
|
let mut actual = null;
|
|
695
695
|
actual.update(&defaulted);
|
|
696
696
|
|
|
697
|
-
|
|
697
|
+
assert_data_eq!(actual.into_json(), defaulted.into_json());
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
#[test]
|
|
@@ -708,7 +708,7 @@ mod test {
|
|
|
708
708
|
let mut actual = null;
|
|
709
709
|
actual.update(&extended);
|
|
710
710
|
|
|
711
|
-
|
|
711
|
+
assert_data_eq!(actual.into_json(), extended.into_json());
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
#[test]
|
|
@@ -726,7 +726,7 @@ mod test {
|
|
|
726
726
|
actual.update(&extended);
|
|
727
727
|
|
|
728
728
|
let expected: Vec<KString> = vec!["*.foo".into(), "*.bar".into()];
|
|
729
|
-
|
|
729
|
+
assert_data_eq!(actual.extend_glob.into_json(), expected.into_json());
|
|
730
730
|
}
|
|
731
731
|
|
|
732
732
|
#[test]
|
|
@@ -749,7 +749,7 @@ check-file = true
|
|
|
749
749
|
},
|
|
750
750
|
);
|
|
751
751
|
let actual = Config::from_toml(input).unwrap();
|
|
752
|
-
|
|
752
|
+
assert_data_eq!(actual.into_json(), expected.into_json());
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
#[test]
|
|
@@ -781,6 +781,6 @@ inout = "inout"
|
|
|
781
781
|
},
|
|
782
782
|
);
|
|
783
783
|
let actual = Config::from_toml(input).unwrap();
|
|
784
|
-
|
|
784
|
+
assert_data_eq!(actual.into_json(), expected.into_json());
|
|
785
785
|
}
|
|
786
786
|
}
|
|
@@ -27,9 +27,10 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
27
27
|
("bat", &["*.bat", "*.cmd"]),
|
|
28
28
|
("bazel", &[
|
|
29
29
|
"*.bazel", "*.bzl", "*.BUILD", "*.bazelrc", "BUILD", "MODULE.bazel",
|
|
30
|
-
"WORKSPACE", "WORKSPACE.bazel",
|
|
30
|
+
"WORKSPACE", "WORKSPACE.bazel", "WORKSPACE.bzlmod",
|
|
31
31
|
]),
|
|
32
32
|
("bitbake", &["*.bb", "*.bbappend", "*.bbclass", "*.conf", "*.inc"]),
|
|
33
|
+
("boxlang", &["*.bx", "*.bxm", "*.bxs"]),
|
|
33
34
|
("brotli", &["*.br"]),
|
|
34
35
|
("buildstream", &["*.bst"]),
|
|
35
36
|
("bzip2", &["*.bz2", "*.tbz2"]),
|
|
@@ -56,6 +57,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
56
57
|
"*.pem",
|
|
57
58
|
]),
|
|
58
59
|
("ceylon", &["*.ceylon"]),
|
|
60
|
+
("cfml", &["*.cfc", "*.cfm"]),
|
|
59
61
|
("clojure", &["*.clj", "*.cljc", "*.cljs", "*.cljx"]),
|
|
60
62
|
("cmake", &["*.cmake", "CMakeLists.txt"]),
|
|
61
63
|
("cml", &["*.cml"]),
|
|
@@ -101,6 +103,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
101
103
|
("fsharp", &["*.fs", "*.fsx", "*.fsi"]),
|
|
102
104
|
("fut", &["*.fut"]),
|
|
103
105
|
("gap", &["*.g", "*.gap", "*.gi", "*.gd", "*.tst"]),
|
|
106
|
+
("gleam", &["*.gleam"]),
|
|
104
107
|
("gn", &["*.gn", "*.gni"]),
|
|
105
108
|
("go", &["*.go", "go.mod", "go.work"]),
|
|
106
109
|
("gprbuild", &["*.gpr"]),
|
|
@@ -124,10 +127,11 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
124
127
|
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
|
|
125
128
|
("jl", &["*.jl"]),
|
|
126
129
|
("js", &["*.js", "*.jsx", "*.vue", "*.cjs", "*.mjs"]),
|
|
127
|
-
("json", &["*.json"]),
|
|
130
|
+
("json", &["*.json", "*.sarif"]),
|
|
128
131
|
("jsonl", &["*.jsonl"]),
|
|
129
132
|
("jupyter", &["*.ipynb", "*.jpynb"]),
|
|
130
133
|
("k", &["*.k"]),
|
|
134
|
+
("kconfig", &["Kconfig", "Kconfig.*"]),
|
|
131
135
|
("kotlin", &["*.kt", "*.kts"]),
|
|
132
136
|
("lean", &["*.lean"]),
|
|
133
137
|
("less", &["*.less"]),
|
|
@@ -160,6 +164,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
160
164
|
]),
|
|
161
165
|
("lilypond", &["*.ly", "*.ily"]),
|
|
162
166
|
("lisp", &["*.el", "*.lisp", "*.lsp", "*.sc", "*.scm"]),
|
|
167
|
+
("llvm", &["*.ll"]),
|
|
163
168
|
("lock", &[
|
|
164
169
|
"*.lock",
|
|
165
170
|
"package-lock.json", "pnpm-lock.yaml",
|
|
@@ -177,7 +182,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
177
182
|
"[Gg][Nn][Uu]makefile", "[Mm]akefile",
|
|
178
183
|
"[Gg][Nn][Uu]makefile.am", "[Mm]akefile.am",
|
|
179
184
|
"[Gg][Nn][Uu]makefile.in", "[Mm]akefile.in",
|
|
180
|
-
"*.mk", "*.mak"
|
|
185
|
+
"*.mk", "*.mak", "Makefile.*"
|
|
181
186
|
]),
|
|
182
187
|
("mako", &["*.mako", "*.mao"]),
|
|
183
188
|
("man", &["*.[0-9lnpx]", "*.[0-9][cEFMmpSx]"]),
|
|
@@ -199,7 +204,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
199
204
|
("motoko", &["*.mo"]),
|
|
200
205
|
("msbuild", &[
|
|
201
206
|
"*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets",
|
|
202
|
-
"*.sln",
|
|
207
|
+
"*.sln", "*.slnf",
|
|
203
208
|
]),
|
|
204
209
|
("nim", &["*.nim", "*.nimf", "*.nimble", "*.nims"]),
|
|
205
210
|
("nix", &["*.nix"]),
|
|
@@ -249,7 +254,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
249
254
|
// Idiomatic files
|
|
250
255
|
"config.ru", "Gemfile", ".irbrc", "Rakefile",
|
|
251
256
|
// Extensions
|
|
252
|
-
"*.gemspec", "*.rb", "*.rbw"
|
|
257
|
+
"*.gemspec", "*.rb", "*.rbw", "*.rake"
|
|
253
258
|
]),
|
|
254
259
|
("rust", &[
|
|
255
260
|
"*.rs",
|
|
@@ -258,9 +263,11 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
258
263
|
]),
|
|
259
264
|
("sass", &["*.sass", "*.scss"]),
|
|
260
265
|
("scala", &["*.scala", "*.sbt"]),
|
|
266
|
+
("scdoc", &["*.scd", "*.scdoc"]),
|
|
267
|
+
("seed7", &["*.s7i", "*.sd7"]),
|
|
261
268
|
("sh", &[
|
|
262
269
|
// Portable/misc. init files
|
|
263
|
-
".login", ".logout", ".profile", "profile",
|
|
270
|
+
".env", ".login", ".logout", ".profile", "profile",
|
|
264
271
|
// bash-specific init files
|
|
265
272
|
".bash_login", "bash_login",
|
|
266
273
|
".bash_logout", "bash_logout",
|
|
@@ -279,7 +286,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
279
286
|
".zprofile", "zprofile",
|
|
280
287
|
".zshrc", "zshrc",
|
|
281
288
|
// Extensions
|
|
282
|
-
"*.bash", "*.csh", "*.ksh", "*.sh", "*.tcsh", "*.zsh",
|
|
289
|
+
"*.bash", "*.env", "*.csh", "*.ksh", "*.sh", "*.tcsh", "*.zsh",
|
|
283
290
|
]),
|
|
284
291
|
("slim", &["*.skim", "*.slim", "*.slime"]),
|
|
285
292
|
("smarty", &["*.tpl"]),
|
|
@@ -306,9 +313,8 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
306
313
|
("texinfo", &["*.texi"]),
|
|
307
314
|
("textile", &["*.textile"]),
|
|
308
315
|
("tf", &[
|
|
309
|
-
"*.tf", "*.
|
|
310
|
-
"*.
|
|
311
|
-
"terraform.rc", "*.tfrc",
|
|
316
|
+
"*.tf", "*.tf.json", "*.tfvars", "*.tfvars.json",
|
|
317
|
+
"*.terraformrc", "terraform.rc", "*.tfrc",
|
|
312
318
|
]),
|
|
313
319
|
("thrift", &["*.thrift"]),
|
|
314
320
|
("toml", &["*.toml"]),
|
|
@@ -316,6 +322,7 @@ pub(crate) const DEFAULT_TYPES: &[(&str, &[&str])] = &[
|
|
|
316
322
|
("twig", &["*.twig"]),
|
|
317
323
|
("txt", &["*.txt"]),
|
|
318
324
|
("typoscript", &["*.typoscript"]),
|
|
325
|
+
("typst", &["*.typ"]),
|
|
319
326
|
("usd", &["*.usd", "*.usda", "*.usdc"]),
|
|
320
327
|
("v", &["*.v", "*.vsh"]),
|
|
321
328
|
("vala", &["*.vala"]),
|