Skip to content

Commit a068f2e

Browse files
committed
ci: add spellchecker to pr tests
Signed-off-by: Robert Pack <[email protected]>
1 parent 1cf629c commit a068f2e

File tree

7 files changed

+24
-16
lines changed

7 files changed

+24
-16
lines changed

.github/workflows/dev_pr.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,11 @@ jobs:
8282
body: message
8383
})
8484
core.setFailed(message)
85+
86+
typos:
87+
name: Spell Check
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
- name: Check spelling
92+
uses: crate-ci/typos@v1

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ debug = true
2626
debug = "line-tables-only"
2727

2828
[workspace.dependencies]
29-
delta_kernel = { version = "0.10.0", features = [
30-
"arrow-55",
31-
"internal-api",
32-
] }
29+
delta_kernel = { version = "0.10.0", features = ["arrow-55", "internal-api"] }
3330

3431
# arrow
3532
arrow = { version = "=55.0.0" }
@@ -78,3 +75,6 @@ async-trait = { version = "0.1" }
7875
futures = { version = "0.3" }
7976
tokio = { version = "1" }
8077
num_cpus = { version = "1" }
78+
79+
[workspace.metadata.typos]
80+
default.extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"]

crates/core/src/logstore/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ pub async fn get_latest_version(
646646
let part_count = location_path.prefix_match(prefix).unwrap().count();
647647
if part_count > 1 {
648648
// Per the spec, ignore any files in subdirectories.
649-
// Spark may create these as uncommited transactions which we don't want
649+
// Spark may create these as uncommitted transactions which we don't want
650650
//
651651
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#delta-log-entries
652652
// "Delta files are stored as JSON in a directory at the *root* of the table

crates/core/src/operations/constraints.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ mod tests {
367367
async fn test_constraint_case_sensitive() -> DeltaResult<()> {
368368
let arrow_schema = Arc::new(ArrowSchema::new(vec![
369369
Field::new("Id", ArrowDataType::Utf8, true),
370-
Field::new("vAlue", ArrowDataType::Int32, true),
370+
Field::new("vAlue", ArrowDataType::Int32, true), // spellchecker:disable-line
371371
Field::new("mOdifieD", ArrowDataType::Utf8, true),
372372
]));
373373

@@ -389,12 +389,12 @@ mod tests {
389389

390390
let mut table = DeltaOps(table)
391391
.add_constraint()
392-
.with_constraint("valid_values", "vAlue < 1000")
392+
.with_constraint("valid_values", "vAlue < 1000") // spellchecker:disable-line
393393
.await?;
394394
let version = table.version();
395395
assert_eq!(version, 1);
396396

397-
let expected_expr = "vAlue < 1000";
397+
let expected_expr = "vAlue < 1000"; // spellchecker:disable-line
398398
assert_eq!(get_constraint_op_params(&mut table).await, expected_expr);
399399
assert_eq!(
400400
get_constraint(&table, "delta.constraints.valid_values"),

crates/core/src/operations/merge/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,7 +3324,7 @@ mod tests {
33243324
true,
33253325
),
33263326
StructField::new(
3327-
"vAlue".to_string(),
3327+
"vAlue".to_string(), // spellchecker:disable-line
33283328
DataType::Primitive(PrimitiveType::Integer),
33293329
true,
33303330
),
@@ -3337,7 +3337,7 @@ mod tests {
33373337

33383338
let arrow_schema = Arc::new(ArrowSchema::new(vec![
33393339
Field::new("Id", ArrowDataType::Utf8, true),
3340-
Field::new("vAlue", ArrowDataType::Int32, true),
3340+
Field::new("vAlue", ArrowDataType::Int32, true), // spellchecker:disable-line
33413341
Field::new("mOdifieD", ArrowDataType::Utf8, true),
33423342
]));
33433343

@@ -3374,7 +3374,7 @@ mod tests {
33743374
.when_not_matched_insert(|insert| {
33753375
insert
33763376
.set("Id", "source.Id")
3377-
.set("vAlue", "source.vAlue + 1")
3377+
.set("vAlue", "source.vAlue + 1") // spellchecker:disable-line
33783378
.set("mOdifieD", "source.mOdifieD")
33793379
})
33803380
.unwrap()
@@ -3383,7 +3383,7 @@ mod tests {
33833383

33843384
let expected = vec![
33853385
"+----+-------+------------+",
3386-
"| Id | vAlue | mOdifieD |",
3386+
"| Id | vAlue | mOdifieD |", // spellchecker:disable-line
33873387
"+----+-------+------------+",
33883388
"| A | 1 | 2021-02-01 |",
33893389
"| B | 10 | 2021-02-01 |",

crates/core/src/operations/update.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ mod tests {
863863
true,
864864
),
865865
StructField::new(
866-
"ValUe".to_string(),
866+
"ValUe".to_string(), // spellchecker:disable-line
867867
DeltaDataType::Primitive(PrimitiveType::Integer),
868868
true,
869869
),
@@ -876,7 +876,7 @@ mod tests {
876876

877877
let arrow_schema = Arc::new(ArrowSchema::new(vec![
878878
Field::new("Id", DataType::Utf8, true),
879-
Field::new("ValUe", DataType::Int32, true),
879+
Field::new("ValUe", DataType::Int32, true), // spellchecker:disable-line
880880
Field::new("mOdified", DataType::Utf8, true),
881881
]));
882882

@@ -912,7 +912,7 @@ mod tests {
912912

913913
let expected = vec![
914914
"+----+-------+------------+",
915-
"| Id | ValUe | mOdified |",
915+
"| Id | ValUe | mOdified |", // spellchecker:disable-line
916916
"+----+-------+------------+",
917917
"| A | 1 | 2021-02-02 |",
918918
"| B | 10 | 2021-02-02 |",

crates/core/src/table/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl DeltaTable {
388388
let part_count = location_path.prefix_match(prefix).unwrap().count();
389389
if part_count > 1 {
390390
// Per the spec, ignore any files in subdirectories.
391-
// Spark may create these as uncommited transactions which we don't want
391+
// Spark may create these as uncommitted transactions which we don't want
392392
//
393393
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#delta-log-entries
394394
// "Delta files are stored as JSON in a directory at the *root* of the table

0 commit comments

Comments
 (0)