Skip to content

Commit

Permalink
chore: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
omissis committed May 1, 2023
1 parent 9d2fe38 commit 93f5473
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
adr-tools 3.0.0
golang 1.20.3
golangci-lint 1.52.1
golangci-lint 1.52.2
goreleaser 1.17.1
hadolint 2.12.0
shellcheck 0.9.0
Expand Down
2 changes: 2 additions & 0 deletions pkg/codegen/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func isPointerType(t Type) bool {

func PrimitiveTypeFromJSONSchemaType(jsType, format string, pointer bool) (Type, error) {
var t Type

switch jsType {
case schemas.TypeNameString:
switch format {
Expand All @@ -51,6 +52,7 @@ func PrimitiveTypeFromJSONSchemaType(jsType, format string, pointer bool) (Type,
Name: "Addr",
},
}

default:
t = PrimitiveType{"string"}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/generator/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ func (g *schemaGenerator) generateType(
for _, imprt := range ncg.Package.Imports {
g.output.file.Package.AddImport(imprt.QualifiedName, "")
}

return ncg, nil
}

Expand Down Expand Up @@ -891,6 +892,7 @@ func (g *schemaGenerator) generateTypeInline(
for _, imprt := range ncg.Package.Imports {
g.output.file.Package.AddImport(imprt.QualifiedName, "")
}

return ncg, nil
}

Expand Down

0 comments on commit 93f5473

Please sign in to comment.