Skip to content

Commit 24a3c4b

Browse files
wip
1 parent e2bce8c commit 24a3c4b

File tree

9 files changed

+1
-146
lines changed

9 files changed

+1
-146
lines changed

pkg/merger/merger.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,10 @@ func MergeConfigFiles(
104104
config.IgnorePaths = extraConfig.IgnorePaths
105105
}
106106

107-
if extraConfig.Code.AutoFix != nil {
108-
config.Code.AutoFix = extraConfig.Code.AutoFix
109-
}
110-
111107
if len(extraConfig.Code.Ignore) > 0 {
112108
config.Code.Ignore = extraConfig.Code.Ignore
113109
}
114110

115-
if extraConfig.Dependencies.AutoFix != nil {
116-
config.Dependencies.AutoFix = extraConfig.Dependencies.AutoFix
117-
}
118-
119111
if len(extraConfig.Dependencies.Ignore) > 0 {
120112
config.Dependencies.Ignore = extraConfig.Dependencies.Ignore
121113
}

pkg/merger/merger_test.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,13 @@ func TestMergeConfigFiles(t *testing.T) {
3434
IgnoreDirs: []string{"dir1", "dir2"},
3535
IgnorePaths: []string{"path1", "path2"},
3636
Code: models.Code{
37-
AutoFix: &models.AutoFix{
38-
Enabled: true,
39-
},
4037
Ignore: []models.CodeIgnore{
4138
{
4239
CWEs: []int{123},
4340
},
4441
},
4542
},
4643
Dependencies: models.Dependencies{
47-
AutoFix: &models.AutoFix{
48-
Enabled: true,
49-
},
5044
Ignore: []models.DependenciesIgnore{
5145
{
5246
CVEs: []string{"CVE-2021-1234"},
@@ -78,19 +72,13 @@ func TestMergeConfigFiles(t *testing.T) {
7872
IgnoreDirs: []string{"dir1", "dir2"},
7973
IgnorePaths: []string{"path1", "path2"},
8074
Code: models.Code{
81-
AutoFix: &models.AutoFix{
82-
Enabled: true,
83-
},
8475
Ignore: []models.CodeIgnore{
8576
{
8677
CWEs: []int{123},
8778
},
8879
},
8980
},
9081
Dependencies: models.Dependencies{
91-
AutoFix: &models.AutoFix{
92-
Enabled: true,
93-
},
9482
Ignore: []models.DependenciesIgnore{
9583
{
9684
CVEs: []string{"CVE-2021-1234"},
@@ -122,19 +110,13 @@ func TestMergeConfigFiles(t *testing.T) {
122110
IgnoreDirs: []string{"dir1", "dir2"},
123111
IgnorePaths: []string{"path1", "path2"},
124112
Code: models.Code{
125-
AutoFix: &models.AutoFix{
126-
Enabled: true,
127-
},
128113
Ignore: []models.CodeIgnore{
129114
{
130115
CWEs: []int{123},
131116
},
132117
},
133118
},
134119
Dependencies: models.Dependencies{
135-
AutoFix: &models.AutoFix{
136-
Enabled: true,
137-
},
138120
Ignore: []models.DependenciesIgnore{
139121
{
140122
CVEs: []string{"CVE-2021-1234"},
@@ -173,19 +155,13 @@ func TestMergeConfigFiles(t *testing.T) {
173155
IgnoreDirs: []string{"dir1", "dir2"},
174156
IgnorePaths: []string{"path1", "path2"},
175157
Code: models.Code{
176-
AutoFix: &models.AutoFix{
177-
Enabled: true,
178-
},
179158
Ignore: []models.CodeIgnore{
180159
{
181160
CWEs: []int{123},
182161
},
183162
},
184163
},
185164
Dependencies: models.Dependencies{
186-
AutoFix: &models.AutoFix{
187-
Enabled: true,
188-
},
189165
Ignore: []models.DependenciesIgnore{
190166
{
191167
CVEs: []string{"CVE-2021-1234"},

pkg/models/autofix.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkg/models/code.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ package models
33
type Code struct {
44
EnableFailBuilds *bool `yaml:"enable_fail_builds,omitempty"`
55
Ignore []CodeIgnore `yaml:"ignore,omitempty"`
6-
7-
// TODO deprecate
8-
AutoFix *AutoFix `yaml:"auto_fix,omitempty"`
96
}
107

118
type CodeIgnore struct {

pkg/models/dependencies.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ package models
33
type Dependencies struct {
44
EnableFailBuilds *bool `yaml:"enable_fail_builds,omitempty"`
55
Ignore []DependenciesIgnore `yaml:"ignore,omitempty"`
6-
7-
// TODO deprecate
8-
AutoFix *AutoFix `yaml:"auto_fix,omitempty"`
96
}
107

118
type DependenciesIgnore struct {

pkg/models/models.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ type Configuration struct {
1111

1212
IgnoreDirs []string `yaml:"ignore_dirs,omitempty"`
1313
IgnorePaths []string `yaml:"ignore_paths,omitempty"`
14-
AutoFix *AutoFix `yaml:"auto_fix,omitempty"`
1514

1615
Integrations Integrations `yaml:"integrations,omitempty"`
1716

pkg/validator/autofix.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

pkg/validator/autofix_test.go

Lines changed: 0 additions & 55 deletions
This file was deleted.

pkg/validator/validate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import (
1111
// ValidateConfig return true if provided configuration is valid
1212
func ValidateConfig(config *models.Configuration) bool {
1313
return ValidateSeverityThreshold(config) &&
14-
ValidatePaths(config) &&
15-
ValidateAutoFix(config)
14+
ValidatePaths(config)
1615
}
1716

1817
func IsConfigValid(ctx context.Context, configString string) (bool, error) {

0 commit comments

Comments
 (0)