Open obruendl opened 1 week ago
Evening @obruendl ,
I am using VSG to lint my open-source FPGA standard library Open Logic.
Nice project, btw.
Is there a way to report warnings as errors? For development I tend to accept some warnings until my code works but in CI I would like the pipeline to fail if there are any warnings left.
You could use a global configuration for your CI pipeline:
rule:
global:
severity: "Error"
That would force all rules to report an error. If you named that configuration as vsg-ci.yaml
then you would call it last in the configuration list when you call VSG:
$ vsg -c config1.yaml vsg-ci.yaml
I have a YAML configuration file that works for vsg 3.27. However, if I upgrade to a newer version (3.3.0 or higher) it fails with various errors for the indentation configuration.
I am little confused on the 3.27 versus 3.3.0 since 3.27 is greater than 3.3.0. Could you please clarify.
Also, could you elaborate on the errors with the indentation configuration?
Thanks,
--Jeremy
Thank you for the treat warning as errors case.
Regarding the versions: Silly me - I was confused becasue readthedocs seems to order version numbers as if 3.26 was 3.2.6 and the version number showing up last is 3.9.0.
Sorry for the silly question. Resolved.
@jeremiah-c-leary
I tried the "error as warnings" as you suggested with a second configuration file but this fails.
I created a second YAML file with the global severity "Error" rule as you suggested (vsg_warnings_as_errors.yml). However, if I pass both configs - first my main config and then the warnings-as-errors one - VSG seems to not recognize the rules from my main config file anymore.
You can easily reproduce this by the following steps:
vsg -c ./lint/config/vsg_config.yml -f ./test/base/olo_base_cc_handshake/olo_base_cc_handshake_tb.vhd
vsg -c ./lint/config/vsg_config.yml ./lint/config/vsg_warnings_as_errors.yml -f ./test/base/olo_base_cc_handshake/olo_base_cc_handshake_tb.vhd
Hi Jeremiah,
I am using VSG to lint my open-source FPGA standard library Open Logic.
I have two questions: