Add `--file-types` flag to include only specified config file types
There isn't a way to limit the validation to only a subset of config file types. You can use --exclude-file-types to remove all the ones you do not want scanned but as that list has gotten bigger you'd have to do the following command if you only wanted JSON or XML: validator --exclude-file-types=yaml,toml,ini,properties,hcl,plist,csv,hocon,env,editorconfig. Not only is that hard to remember but even if you save the command you'd have to update it every time we add additional validation types. We need an option to specify which types to include - something like this: validator --file-types=xml,json. We need to also add CLI logic so --file-types and --exclude-file-types should not be used together.
Implementation should be fairly simple because it will be the inverse of --exclude-file-types
Hey there ! I think I can work on this, can you please assign me this ?
@Kinshuk0 Done!
@Kinshuk0 Haven't seen a PR for 2 weeks so opening this up to others
I think building an exclude-file-types list based on file-types can be done to avoid duplicating the code in FSFinder. I have a PR #192 for this.
Is it a good idea?