Skip to content

A way to define exceptions for domain-specific terminology allowed in keywords #1112

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

Open
ralienpp opened this issue Sep 12, 2024 · 1 comment

Comments

@ralienpp
Copy link

I'm considering integrating Robocop in my workflow, the project is a test suite focused on evaluating implementations of a network protocol for managing digital certificates. The domain is full of keywords related to security and PKI (public key infrastructure), like: X509, CSR, ASN1, PKIMessage, DER, PBMAC1, PEM, RSA, etc.

Robocop complains about them, because keywords like Get ASN1 value as DER or PKIMessage body type must be don't follow the each_word_capitalized or first_word_capitalized rule.

However, I believe it is better to leave them like this, because these terms are standardized in the corresponding RFCs and are familiar to the domain experts - they are the target audience for reading the reports and writing new test cases.

After reading the documentation, my understanding is that I can add exceptions by defining a regular expression pattern. Considering that there are many terms, it will be a rather complex regexp, which hinders maintainability in the long run. It would be easier if one could define a list of words which can be used "as is" in keywords.

I was wondering about the best way to accommodate this request in the current version of Robocop. Is there a simpler way to accomplish this, which I am not aware of?

@Lakitna
Copy link
Contributor

Lakitna commented Dec 14, 2024

Your best bet is probably to disable those rules. There are a few options on how to approach this:

  1. Add a rule disabler for every keyword you want to make exceptions for. See https://robocop.readthedocs.io/en/stable/disablers.html#disabling-lines for details on how.
  2. Disable the rule on multiple lines where you want to make exceptions. See https://robocop.readthedocs.io/en/stable/disablers.html#enabling-back for details on how.
  3. Disable the rule for your entire project. See https://robocop.readthedocs.io/en/stable/configuration.html and look for the option exclude for details on how.

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

2 participants