Closed vogJust closed 1 month ago
Related to #5 (easier to navigate than having it in issue title)
Also having issue in the title only, do not create a link (someone referenced this issue in…) between issues
@vogJust Need to add unit tests for changes to validator.go
and fsfinder.go
@vogJust
A few things from functional testing:
The program crashes when using extensionless capabilities and grouping by filetype:
>> docker run -it --rm -v $(pwd)/test/fixtures/extensionless:/test cfv:extensionless -unchecked-files=/test/extensionlessIni:ini,/test/extensionlessJson:json,/test/extensionlessCsv:Csv --reporter=standard --groupby=filetype /test
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/Boeing/config-file-validator/pkg/cli.GroupByFileType({0xc000138100, 0x3, 0xc000139f80?})
/build/pkg/cli/group_output.go:15 +0x31b
github.com/Boeing/config-file-validator/pkg/cli.GroupBySingle({0xc000138100, 0x3, 0x4}, {0x7fff84519f70, 0x8})
/build/pkg/cli/group_output.go:88 +0xae
github.com/Boeing/config-file-validator/pkg/cli.CLI.printGroupSingle({{0x7ba000?, 0xc0000b0120?}, {0x7ba060?, 0xa097e0?}}, {0xc000138100?, 0x4?, 0x80?})
/build/pkg/cli/cli.go:145 +0x5d
github.com/Boeing/config-file-validator/pkg/cli.CLI.printReports({{0x7ba000?, 0xc0000b0120?}, {0x7ba060?, 0xa097e0?}}, {0xc000138100?, 0x7b70a0?, 0x7ff563cb8368?})
/build/pkg/cli/cli.go:128 +0x51
github.com/Boeing/config-file-validator/pkg/cli.CLI.Run({{0x7ba000?, 0xc0000b0120?}, {0x7ba060?, 0xa097e0?}})
/build/pkg/cli/cli.go:112 +0x385
main.mainInit()
/build/cmd/validator/validator.go:280 +0x82a
main.main()
/build/cmd/validator/validator.go:289 +0x13
--unchecked-file-config
file. I finally got it working using the below format. This needs to be documented in the README so users understand how to use it.
files:
- /test/extensionlessIni:ini
--unchecked-file-config
. Using this format skips ini and csv
files:
- /test/fixtures/extensionless/extensionlessJson:json
- /test/fixtures/extensionless/extensionlessIni:ini
- /test/fixtures/extensionless/extensionlessCsv:csv
@vogJust Pipeline is not passing:
Sorry Clay, I definitely needed to clarify that in the documentation. The intended format for the config .yml file is
`ini:
This will also work:
ini: @vogJust Make sure you resolve the conflicts with a couple changes that got pushed to main a few days ago
Adds command option to support config files without extensions by adding them manually.
Closes #5