Skip to content

Commit e6355e2

Browse files
committed
Correct misspellings of "marshal"
Apparently I somehow got it into my head that there are two "l"s in the variants.
1 parent c5e49f2 commit e6355e2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: internal/result/result.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ func (results Type) JSONReport() string {
274274
return string(results.jsonReportRaw())
275275
}
276276

277-
// jsonReportRaw returns the report marshalled into JSON format in byte encoding.
277+
// jsonReportRaw returns the report marshaled into JSON format in byte encoding.
278278
func (results Type) jsonReportRaw() []byte {
279-
var marshalledReportBuffer bytes.Buffer
280-
jsonEncoder := json.NewEncoder(io.Writer(&marshalledReportBuffer))
281-
// By default, the json package HTML-sanitizes strings during marshalling (https://golang.org/pkg/encoding/json/#Marshal)
279+
var marshaledReportBuffer bytes.Buffer
280+
jsonEncoder := json.NewEncoder(io.Writer(&marshaledReportBuffer))
281+
// By default, the json package HTML-sanitizes strings during marshaling (https://golang.org/pkg/encoding/json/#Marshal)
282282
// This means that the simple json.MarshalIndent() approach would result in the report containing gibberish.
283283
jsonEncoder.SetEscapeHTML(false)
284284
jsonEncoder.SetIndent("", " ")
@@ -287,7 +287,7 @@ func (results Type) jsonReportRaw() []byte {
287287
panic(fmt.Sprintf("Error while formatting rules report: %v", err))
288288
}
289289

290-
return marshalledReportBuffer.Bytes()
290+
return marshaledReportBuffer.Bytes()
291291
}
292292

293293
// WriteReport writes a report for all projects to the specified file.

Diff for: internal/rule/schema/parsevalidationresult.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,19 @@ func validationErrorSchemaSubPointerMatch(schemaPointerRegexp *regexp.Regexp, pa
200200
return ""
201201
}
202202

203-
// validationErrorSchemaPointerValueMatch marshalls the data in the schema at the given JSON pointer and returns whether
203+
// validationErrorSchemaPointerValueMatch marshals the data in the schema at the given JSON pointer and returns whether
204204
// it matches against the given regular expression.
205205
func validationErrorSchemaPointerValueMatch(
206206
schemaPointerValueRegexp *regexp.Regexp,
207207
validationError ValidationResult,
208208
schemaPointer string,
209209
) bool {
210-
marshalledSchemaPointerValue, err := json.Marshal(schemaPointerValue(validationError.Result.SchemaURL, schemaPointer, validationError.dataLoader))
210+
marshaledSchemaPointerValue, err := json.Marshal(schemaPointerValue(validationError.Result.SchemaURL, schemaPointer, validationError.dataLoader))
211211
if err != nil {
212212
panic(err)
213213
}
214-
logrus.Tracef("Checking schema pointer value: %s match with regexp: %s", marshalledSchemaPointerValue, schemaPointerValueRegexp)
215-
return schemaPointerValueRegexp.Match(marshalledSchemaPointerValue)
214+
logrus.Tracef("Checking schema pointer value: %s match with regexp: %s", marshaledSchemaPointerValue, schemaPointerValueRegexp)
215+
return schemaPointerValueRegexp.Match(marshaledSchemaPointerValue)
216216
}
217217

218218
// validationErrorContextMatch parses the validation error context data and returns whether it matches against the given

0 commit comments

Comments
 (0)