Skip to content

Bump codespell from 2.2.2 to 2.2.4 #506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions internal/result/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ func (results Type) JSONReport() string {
return string(results.jsonReportRaw())
}

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

return marshalledReportBuffer.Bytes()
return marshaledReportBuffer.Bytes()
}

// WriteReport writes a report for all projects to the specified file.
Expand Down
8 changes: 4 additions & 4 deletions internal/rule/schema/parsevalidationresult.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,19 @@ func validationErrorSchemaSubPointerMatch(schemaPointerRegexp *regexp.Regexp, pa
return ""
}

// validationErrorSchemaPointerValueMatch marshalls the data in the schema at the given JSON pointer and returns whether
// validationErrorSchemaPointerValueMatch marshals the data in the schema at the given JSON pointer and returns whether
// it matches against the given regular expression.
func validationErrorSchemaPointerValueMatch(
schemaPointerValueRegexp *regexp.Regexp,
validationError ValidationResult,
schemaPointer string,
) bool {
marshalledSchemaPointerValue, err := json.Marshal(schemaPointerValue(validationError.Result.SchemaURL, schemaPointer, validationError.dataLoader))
marshaledSchemaPointerValue, err := json.Marshal(schemaPointerValue(validationError.Result.SchemaURL, schemaPointer, validationError.dataLoader))
if err != nil {
panic(err)
}
logrus.Tracef("Checking schema pointer value: %s match with regexp: %s", marshalledSchemaPointerValue, schemaPointerValueRegexp)
return schemaPointerValueRegexp.Match(marshalledSchemaPointerValue)
logrus.Tracef("Checking schema pointer value: %s match with regexp: %s", marshaledSchemaPointerValue, schemaPointerValueRegexp)
return schemaPointerValueRegexp.Match(marshaledSchemaPointerValue)
}

// validationErrorContextMatch parses the validation error context data and returns whether it matches against the given
Expand Down
11 changes: 6 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mkdocs-material = "^9.1.2"

[tool.poetry.dev-dependencies]
black = "^23.1"
codespell = "^2.2.2"
codespell = "^2.2.4"
flake8 = "^6.0.0"
pep8-naming = "^0.13.3"

Expand Down