Skip to content

Commit 5a282db

Browse files
committed
lint
1 parent 7bc95fc commit 5a282db

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

plugin/testing_validation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ func ValidateNoEmptyColumns(t *testing.T, tables schema.Tables, messages message
1414
if len(emptyColumns) > 0 {
1515
t.Fatalf("found empty column(s): %v in %s", emptyColumns, table.Name)
1616
}
17-
nonMatchingColumns, nonMatchingJsonColumns := schema.FindNotMatchingSensitiveColumns(table, records)
17+
nonMatchingColumns, nonMatchingJSONColumns := schema.FindNotMatchingSensitiveColumns(table)
1818
if len(nonMatchingColumns) > 0 {
1919
t.Fatalf("found non-matching sensitive column(s): %v in %s", nonMatchingColumns, table.Name)
2020
}
21-
if len(nonMatchingJsonColumns) > 0 {
22-
t.Fatalf("found non-matching sensitive JSON column(s): %v in %s", nonMatchingJsonColumns, table.Name)
21+
if len(nonMatchingJSONColumns) > 0 {
22+
t.Fatalf("found non-matching sensitive JSON column(s): %v in %s", nonMatchingJSONColumns, table.Name)
2323
}
2424
}
2525
}

schema/validators.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,34 @@ func FindEmptyColumns(table *Table, records []arrow.Record) []string {
4242
return emptyColumns
4343
}
4444

45-
func FindNotMatchingSensitiveColumns(table *Table, records []arrow.Record) ([]string, []string) {
45+
func FindNotMatchingSensitiveColumns(table *Table) (nonMatchingColumns []string, nonMatchingJSONColumns []string) {
4646
if len(table.SensitiveColumns) == 0 {
4747
return []string{}, []string{}
4848
}
4949

50-
nonMatchingColumns := make([]string, 0)
51-
nonMatchingJsonColumns := make([]string, 0)
50+
nonMatchingColumns = make([]string, 0)
51+
nonMatchingJSONColumns = make([]string, 0)
5252
tableColumns := table.Columns.Names()
5353
for _, c := range table.SensitiveColumns {
54-
isJsonPath := false
54+
isJSONPath := false
5555
if strings.Contains(c, ".") {
5656
c = strings.Split(c, ".")[0]
57-
isJsonPath = true
57+
isJSONPath = true
5858
}
5959
if !slices.Contains(tableColumns, c) {
6060
nonMatchingColumns = append(nonMatchingColumns, c)
6161
continue
6262
}
63-
if !isJsonPath {
63+
if !isJSONPath {
6464
continue
6565
}
6666
col := table.Columns.Get(c)
6767
if !arrow.TypeEqual(col.Type, types.ExtensionTypes.JSON) {
68-
nonMatchingJsonColumns = append(nonMatchingJsonColumns, c)
68+
nonMatchingJSONColumns = append(nonMatchingJSONColumns, c)
6969
continue
7070
}
7171
}
72-
return nonMatchingColumns, nonMatchingJsonColumns
72+
return nonMatchingColumns, nonMatchingJSONColumns
7373
}
7474

7575
func isEmptyJSON(msg json.RawMessage) bool {

0 commit comments

Comments
 (0)