Skip to content

Commit 76d8451

Browse files
alexzhang1030HerringtonDarkholme
authored andcommitted
fix: obvious typo
1 parent 8b523e7 commit 76d8451

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

crates/cli/src/lang/alias_lang.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl FromStr for AliasLang {
143143
});
144144
}
145145
}
146-
Err(format!("unknow language `{name}`."))
146+
Err(format!("unknown language `{name}`."))
147147
}
148148
}
149149

crates/cli/src/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub fn run_with_pattern(arg: RunArg) -> Result<()> {
119119
let printer = ColoredPrinter::stdout(arg.output.color)
120120
.heading(arg.heading)
121121
.context(context);
122-
let interactive = arg.output.needs_interacive();
122+
let interactive = arg.output.needs_interactive();
123123
if interactive {
124124
let from_stdin = arg.input.is_stdin();
125125
let printer = InteractivePrinter::new(printer, arg.output.update_all, from_stdin)?;

crates/cli/src/scan.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn run_with_config(arg: ScanArg) -> Result<()> {
6868
return run_scan(arg, printer);
6969
}
7070
let printer = ColoredPrinter::stdout(arg.output.color).style(arg.report_style);
71-
let interactive = arg.output.needs_interacive();
71+
let interactive = arg.output.needs_interactive();
7272
if interactive {
7373
let from_stdin = arg.input.is_stdin();
7474
let printer = InteractivePrinter::new(printer, arg.output.update_all, from_stdin)?;
@@ -136,7 +136,7 @@ impl<P: Printer + Sync> Worker for ScanWithConfig<P> {
136136
let path = &path;
137137
let rules = self.configs.for_path(path);
138138
let combined = CombinedScan::new(rules);
139-
let interactive = self.arg.output.needs_interacive();
139+
let interactive = self.arg.output.needs_interactive();
140140
if interactive {
141141
let diffs = combined
142142
.diffs(&grep, hit_set.clone())

crates/cli/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ pub struct OutputArgs {
324324

325325
impl OutputArgs {
326326
// either explicit interactive or implicit update_all
327-
pub fn needs_interacive(&self) -> bool {
327+
pub fn needs_interactive(&self) -> bool {
328328
self.interactive || self.update_all
329329
}
330330
}

crates/config/src/deserialize_env.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ pub struct DeserializeEnv<L: Language> {
1616
pub(crate) lang: L,
1717
}
1818

19-
trait DepedentRule: Sized {
19+
trait DependentRule: Sized {
2020
fn visit_dependent_rules<'a>(&'a self, sorter: &mut TopologicalSort<'a, Self>)
2121
-> OrderResult<()>;
2222
}
2323

24-
impl DepedentRule for SerializableRule {
24+
impl DependentRule for SerializableRule {
2525
fn visit_dependent_rules<'a>(
2626
&'a self,
2727
sorter: &mut TopologicalSort<'a, Self>,
@@ -30,7 +30,7 @@ impl DepedentRule for SerializableRule {
3030
}
3131
}
3232

33-
impl<L: Language> DepedentRule for SerializableRuleCore<L> {
33+
impl<L: Language> DependentRule for SerializableRuleCore<L> {
3434
fn visit_dependent_rules<'a>(
3535
&'a self,
3636
sorter: &mut TopologicalSort<'a, Self>,
@@ -39,14 +39,14 @@ impl<L: Language> DepedentRule for SerializableRuleCore<L> {
3939
}
4040
}
4141

42-
struct TopologicalSort<'a, T: DepedentRule> {
42+
struct TopologicalSort<'a, T: DependentRule> {
4343
utils: &'a HashMap<String, T>,
4444
order: Vec<&'a String>,
4545
// bool stands for if the rule has completed visit
4646
seen: HashMap<&'a String, bool>,
4747
}
4848

49-
impl<'a, T: DepedentRule> TopologicalSort<'a, T> {
49+
impl<'a, T: DependentRule> TopologicalSort<'a, T> {
5050
fn get_order(utils: &HashMap<String, T>) -> OrderResult<Vec<&String>> {
5151
let mut top_sort = TopologicalSort::new(utils);
5252
for rule_id in utils.keys() {
@@ -89,7 +89,7 @@ impl<'a, T: DepedentRule> TopologicalSort<'a, T> {
8989
}
9090
}
9191

92-
fn visit_dependent_rule_ids<'a, T: DepedentRule>(
92+
fn visit_dependent_rule_ids<'a, T: DependentRule>(
9393
rule: &'a SerializableRule,
9494
sort: &mut TopologicalSort<'a, T>,
9595
) -> OrderResult<()> {

crates/core/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl<'r, D: Doc> Node<'r, D> {
176176
source.get_text(&self.inner)
177177
}
178178

179-
/// Node's tree structure dumped in Lisp like S-experssion
179+
/// Node's tree structure dumped in Lisp like S-expression
180180
pub fn to_sexp(&self) -> Cow<'_, str> {
181181
self.inner.to_sexp()
182182
}

crates/core/src/ops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ where
2929
fn potential_kinds(&self) -> Option<BitSet> {
3030
let set1 = self.pattern1.potential_kinds();
3131
let set2 = self.pattern2.potential_kinds();
32-
// if both constituent have Some(bitset), intesect them
32+
// if both constituent have Some(bitset), intersect them
3333
// otherwise returns either of the non-null set
3434
match (&set1, &set2) {
3535
(Some(s1), Some(s2)) => Some(s1.intersection(s2).collect()),
@@ -38,7 +38,7 @@ where
3838
}
3939
}
4040

41-
// we precompute and cache potential_kinds. So patterns should not be mutated.
41+
// we pre-compute and cache potential_kinds. So patterns should not be mutated.
4242
// Box<[P]> is used here for immutability so that kinds will never be invalidated.
4343
pub struct All<L: Language, P: Matcher<L>> {
4444
patterns: Box<[P]>,

crates/napi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ macro_rules! impl_lang_mod {
7272
}
7373

7474
/// Parse a string to an ast-grep instance asynchronously in threads.
75-
/// It utlizes multiple CPU cores when **concurrent processing sources**.
75+
/// It utilize multiple CPU cores when **concurrent processing sources**.
7676
/// However, spawning excessive many threads may backfire.
7777
/// Please refer to libuv doc, nodejs' underlying runtime
7878
/// for its default behavior and performance tuning tricks.

schemas/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"snapshotDir": {
4646
"type": "string",
47-
"description": "A string path relative to testDir that specifies where to store test snapshots for ast-grep. You can think it like __snapshots___ in popular test framework like jest. If this option is not specified, ast-grep will store the snapshot under the __snapshots__ folder undert the testDir."
47+
"description": "A string path relative to testDir that specifies where to store test snapshots for ast-grep. You can think it like __snapshots___ in popular test framework like jest. If this option is not specified, ast-grep will store the snapshot under the __snapshots__ folder under the testDir."
4848
}
4949
},
5050
"required": ["testDir"],

0 commit comments

Comments
 (0)