@@ -126,7 +126,7 @@ func TestProcessFlags(t *testing.T) {
126126 t .Run ("ValidateVarMapping" , func (t * testing.T ) {
127127 // Reset global variables
128128 validateVar = false
129- engineConfigVar .ScanConfig . WithValidation = false
129+ engineConfigVar .WithValidation = false
130130
131131 // Set test value
132132 validateVar = true
@@ -137,7 +137,7 @@ func TestProcessFlags(t *testing.T) {
137137 processFlags (rootCmd )
138138
139139 // Verify mapping
140- assert .Equal (t , validateVar , engineConfigVar .ScanConfig . WithValidation , "validateVar should be mapped to engineConfigVar.ScanConfig .WithValidation" )
140+ assert .Equal (t , validateVar , engineConfigVar .WithValidation , "validateVar should be mapped to engineConfigVar.WithValidation" )
141141 })
142142
143143 t .Run ("IgnoreListProcessing" , func (t * testing.T ) {
@@ -170,7 +170,7 @@ func TestProcessFlags(t *testing.T) {
170170
171171 // Verify all mappings
172172 assert .Equal (t , customRegexRuleVar , engineConfigVar .CustomRegexPatterns , "Custom regex patterns should be mapped" )
173- assert .Equal (t , validateVar , engineConfigVar .ScanConfig . WithValidation , "Validation flag should be mapped" )
173+ assert .Equal (t , validateVar , engineConfigVar .WithValidation , "Validation flag should be mapped" )
174174 assert .Equal (t , []string {"ignored-rule" }, engineConfigVar .IgnoreList , "IgnoreList should be preserved" )
175175 assert .Equal (t , 50 , engineConfigVar .MaxTargetMegabytes , "MaxTargetMegabytes should be preserved" )
176176 })
@@ -181,7 +181,7 @@ func TestProcessFlags(t *testing.T) {
181181 validateVar = false
182182 engineConfigVar .IgnoreList = []string {}
183183 engineConfigVar .CustomRegexPatterns = []string {}
184- engineConfigVar .ScanConfig . WithValidation = false
184+ engineConfigVar .WithValidation = false
185185
186186 // Process flags
187187 rootCmd := & cobra.Command {Use : "test" }
@@ -190,7 +190,7 @@ func TestProcessFlags(t *testing.T) {
190190
191191 // Verify empty values are handled correctly
192192 assert .Empty (t , engineConfigVar .CustomRegexPatterns , "Empty custom regex patterns should remain empty" )
193- assert .False (t , engineConfigVar .ScanConfig . WithValidation , "Validation should be false by default" )
193+ assert .False (t , engineConfigVar .WithValidation , "Validation should be false by default" )
194194 assert .Empty (t , engineConfigVar .IgnoreList , "Empty ignore list should remain empty" )
195195 })
196196}
@@ -220,7 +220,7 @@ max-target-megabytes: 10`
220220 processFlags (rootCmd )
221221
222222 // Verify CLI values take precedence
223- assert .True (t , engineConfigVar .ScanConfig . WithValidation , "CLI validate flag should override config file" )
223+ assert .True (t , engineConfigVar .WithValidation , "CLI validate flag should override config file" )
224224 assert .Equal (t , zerolog .DebugLevel , log .Logger .GetLevel (), "CLI log level should override config file" )
225225 })
226226}
0 commit comments