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

Rule #13 - Spell out numbers - False positive #67

Open
izmalk opened this issue Jul 20, 2024 · 0 comments
Open

Rule #13 - Spell out numbers - False positive #67

izmalk opened this issue Jul 20, 2024 · 0 comments

Comments

@izmalk
Copy link
Contributor

izmalk commented Jul 20, 2024

The following warnings:

 /home/izmalk/test/docs/izmalk/kafka-k8s-operator/docs/reference/r-requirements.md
 10:5    warning  Use 'one' instead of '1'        Canonical.013-Spell-out-numbers-below-10 
 10:126  warning  Use 'two' instead of '2'        Canonical.013-Spell-out-numbers-below-10 

Shown for the following source line:

* 3.1.6+ (due to issues with Juju secrets in previous versions, see [#1](https://bugs.launchpad.net/juju/+bug/2029285) and [#2](https://bugs.launchpad.net/juju/+bug/2029282))

As far as I understand the regular expression specifically excludes numbers preceded or followed by a dot (see the YAML file) . So the warning for 10:5 should not be triggered.

Adding single quotes around the RegEx or removing the escape symbols didn't help.

I'm not sure why the 10:126 warning (for the #2) is triggered but the 10:71 (for the #1) is not.
If I add the # to the negated Lookbehind pattern, both 10:5 and 10:126 warnings go away:

(?<![\-\.\,:\/*-+#])0(?![\-\.\,:\/*-+]): zero

Could that be, that it's a bug that it shows the 10:5 warning when it should have shown the 10:71 instead (for the #1)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant