Skip to content

Commit a188fbc

Browse files
authored
analyzer: update for custom order (#91)
Signed-off-by: Loong <[email protected]>
1 parent c32c832 commit a188fbc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pkg/analyzer/analyzer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ func generateCmdLine(cfg config.Config) string {
146146
result += " --skip-generated "
147147
}
148148

149+
if cfg.BoolConfig.CustomOrder {
150+
result += " --custom-order "
151+
}
152+
149153
for _, s := range cfg.Sections.String() {
150154
result += fmt.Sprintf(" --Section \"%s\" ", s)
151155
}

pkg/analyzer/errors_test.go

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

10-
func TestErrorMatching(t *testing.T) {
10+
func TestInvalidNumberOfFiles(t *testing.T) {
1111
assert.True(t, errors.Is(InvalidNumberOfFilesInAnalysis{1, 2}, InvalidNumberOfFilesInAnalysis{}))
1212
}

pkg/config/config_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ func TestInitGciConfigFromYAML(t *testing.T) {
2929
assert.Equal(t, section.SectionList{section.Default{}}, gciCfg.Sections)
3030
assert.False(t, gciCfg.Debug)
3131
assert.True(t, gciCfg.SkipGenerated)
32+
assert.False(t, gciCfg.CustomOrder)
3233
}

0 commit comments

Comments
 (0)