Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New file rules configuration tag #593

Open
imd1 opened this issue May 31, 2021 · 2 comments
Open

New file rules configuration tag #593

imd1 opened this issue May 31, 2021 · 2 comments
Assignees

Comments

@imd1
Copy link
Contributor

imd1 commented May 31, 2021

Is your feature request related to a problem? Please describe.
I'd like to be able to create a configuration file that lists rules to be applied to files matching certain file specs. Currently the
file_list mechanism is close but this also makes the files matching the file specs automatically be included in the list of files to be processed, whereas I want to specify rules for files matching the file spec and only include them in the list to process if they are included via -f.

An example is I want to change the rules for files in my folder hierarchy that are have the folder name test_hdl in their path, but only process them if these files are specified via -f

Note that I use -f, and so this feature need not be applied to files via file_list since this existing feature supports what I want already.

Describe the solution you'd like
Create a new configuration file tag (I favor file_rules but whatever...) which adopts the same format as file_list i.e. file specs with globbing etc. If files specified via -f match a file_rules file spec, the associated rules are applied.

Note that order of rules still applies, so a global setting processed after file_rules is allowed to overrule as expected

@jeremiah-c-leary
Copy link
Owner

Let me see if I understand what you are looking for...You would like to have a way to map partial filenames and paths to certain rules. Such that when you pass them to vsg, this map will be checked and the rules changed accordingly.

Is that close?

If I do understand, this function is currently left to the user to manage, but you would like VSG to be able to manage it.

@imd1
Copy link
Contributor Author

imd1 commented Oct 7, 2021

I think you have understood this correctly

@jeremiah-c-leary jeremiah-c-leary added this to Incomming in Issue Triage via automation Nov 1, 2021
@jeremiah-c-leary jeremiah-c-leary moved this from Incomming to Ready for Project in Issue Triage Nov 1, 2021
@jeremiah-c-leary jeremiah-c-leary self-assigned this Feb 1, 2022
@jeremiah-c-leary jeremiah-c-leary removed this from Ready for Project in Issue Triage Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Deferred
Development

No branches or pull requests

2 participants