Skip to content

Commit 193fb11

Browse files
committed
ci lint: enable a few other linters
1 parent 17fc89a commit 193fb11

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

.github/workflows/lint-golangci-lint.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ linters:
3131
- gocognit
3232
- gocyclo
3333
- gocritic
34+
- godot
3435
- godox
3536
- goheader
3637
- gomoddirectives
@@ -40,6 +41,17 @@ linters:
4041
- gosmopolitan
4142
- govet
4243
- grouper
44+
- iface
45+
- importas
46+
- ineffassign
47+
- interfacebloat
48+
- intrange
49+
- loggercheck
50+
- maintidx
51+
- makezero
52+
- mirror
53+
- misspell
54+
- musttag
4355
- staticcheck
4456

4557
disable:
@@ -52,22 +64,11 @@ linters:
5264
- funlen
5365
- gochecknoglobals
5466
- goconst
55-
- godot
56-
- iface
57-
- importas
5867
- inamedparam
59-
- ineffassign
60-
- interfacebloat
61-
- intrange
6268
- ireturn
6369
- lll
64-
- loggercheck
65-
- maintidx
66-
- makezero
67-
- mirror
68-
- misspell
6970
- mnd
70-
- musttag
71+
7172
- nakedret
7273
- nestif
7374
- nilerr

pkg/xsd/attribute.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/iancoleman/strcase"
88
)
99

10-
// Attribute defines single XML attribute
10+
// Attribute defines single XML attribute.
1111
type Attribute struct {
1212
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema attribute"`
1313
Name string `xml:"name,attr"`
@@ -35,7 +35,7 @@ func (a *Attribute) Documentation() string {
3535
return a.Annotation.Documentations[0].GetContent()
3636
}
3737

38-
// Public Go Name of this struct item
38+
// Public Go Name of this struct item.
3939
func (a *Attribute) GoName() string {
4040
name := a.Name
4141
if a.Name == "" {

pkg/xsd/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/iancoleman/strcase"
77
)
88

9-
// Internal XSD reference. Examples: "xml:lang", "cpe2:platform-specification"
9+
// Internal XSD reference. Examples: "xml:lang", "cpe2:platform-specification".
1010
type reference string
1111

1212
func (ref reference) NsPrefix() string {

pkg/xsd/element.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/iancoleman/strcase"
99
)
1010

11-
// Element defines single XML element
11+
// Element defines single XML element.
1212
type Element struct {
1313
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema element"`
1414
Name string `xml:"name,attr"`

pkg/xsd/enum.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"github.com/iancoleman/strcase"
88
)
99

10-
// Attribute defines single XML attribute
10+
// Attribute defines single XML attribute.
1111
type Enumeration struct {
1212
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema enumeration"`
1313
Value string `xml:"value,attr"`
1414
}
1515

16-
// Public Go Name of this struct item
16+
// Public Go Name of this struct item.
1717
func (e *Enumeration) GoName() string {
1818
return strcase.ToCamel(strings.ToLower(e.Value))
1919
}

pkg/xsd/schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"golang.org/x/net/html/charset"
1212
)
1313

14-
// Schema is the root XSD element
14+
// Schema is the root XSD element.
1515
type Schema struct {
1616
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema schema"`
1717
Xmlns Xmlns `xml:"-"`
@@ -294,7 +294,7 @@ func (sch *Schema) registerImportedModule(module *Schema) {
294294
sch.importedModules[module.GoPackageName()] = module
295295
}
296296

297-
// Some elements are not defined at the top-level, rather these are inlined in the complexType definitions
297+
// Some elements are not defined at the top-level, rather these are inlined in the complexType definitions.
298298
func (sch *Schema) registerInlinedElement(el *Element, parentElement *Element) {
299299
if sch.isElementInlined(el) {
300300
if el.Name == "" {

0 commit comments

Comments
 (0)