@@ -350,9 +350,8 @@ func (r *Runner) EnsureNoError(err error, proc func() error) error {
350
350
return err
351
351
}
352
352
353
- // NewLocalRunner initialises a new test runner.
354
- // Internal use only.
355
- func NewLocalRunner (files map [string ]* hcl.File , issues Issues ) * Runner {
353
+ // newLocalRunner initialises a new test runner.
354
+ func newLocalRunner (files map [string ]* hcl.File , issues Issues ) * Runner {
356
355
return & Runner {
357
356
files : map [string ]* hcl.File {},
358
357
sources : map [string ][]byte {},
@@ -361,9 +360,9 @@ func NewLocalRunner(files map[string]*hcl.File, issues Issues) *Runner {
361
360
}
362
361
}
363
362
364
- // AddLocalFile adds a new file to the current mapped files.
365
- // Internal use only.
366
- func (r * Runner ) AddLocalFile (name string , file * hcl.File ) bool {
363
+ // addLocalFile adds a new file to the current mapped files.
364
+ // For testing only. Normally, the main TFLint process is responsible for loading files .
365
+ func (r * Runner ) addLocalFile (name string , file * hcl.File ) bool {
367
366
if _ , exists := r .files [name ]; exists {
368
367
return false
369
368
}
@@ -373,6 +372,8 @@ func (r *Runner) AddLocalFile(name string, file *hcl.File) bool {
373
372
return true
374
373
}
375
374
375
+ // initFromFiles initializes the runner from locally added files.
376
+ // For testing only.
376
377
func (r * Runner ) initFromFiles () error {
377
378
for _ , file := range r .files {
378
379
content , _ , diags := file .Body .PartialContent (configFileSchema )
0 commit comments