wdl
wdl copied to clipboard
False positives in the `snake_case` rule
In workflows we have multiple variables that end in the suffix _md5
. These get flagged by the snake_case
rule as needing to be changed to *_md_5
. I'd call that a bug in the code which needs to be addressed.
From the convert_case
docs:
By default, to_case will split along a set of default word boundaries, that is
space characters , underscores _, hyphens -, changes in capitalization from lowercase to uppercase aA, adjacent digits and letters a1, 1a, A1, 1A, and acroynms AAa (as in HTTPRequest).
adjacent digits and letters a1, 1a, A1, 1A,
is the specific issue here.
We also have variables that contain the substring dbSNP
that get flagged by snake_case
as needing to be db_SNP
. Any sane to_snake_case
algorithm would make this "correction" so it's not a "false positive". However the camelCase string dbSNP
is meaningful as it refers to the NIH's dbSNP database, and changing the variable substring to db_SNP
would be obfuscating the connection to the NIH's dbSNP. This is a special case where the wdl
crates need to be configurable so that they ignore specific instances of a lint. We don't want to completely disable the snake_case
rule, just silence it in this instance.
We should add a feature that allows lints to be ignored for a specific line (File dbSNP_vcf. # ignore: snake_case
or something)