Extend Graphql/Descriptions cop to ban descriptions beginning with "A...", or "The..." except for enum values

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

About

This came out of the discussion: !55030 (comment 516675557).

We would like to extend the existing Graphql/Descriptions cop to ban descriptions starting with "A... " or "The... ". We need to cop to exempt enum value descriptions from this new rule.

After !55132 (merged) is merged it should be easy to extend it to do this, as it has a check for whether the node is an enum?.

The corresponding spec should be updated.

Process

Update the existing Graphql/Descriptions cop and the corresponding spec with the functionality.

Follow the resolving robocop exceptions process to add existing offenses to .rubocop_todo.yml in the MR that introduces the cop.

Successive merge requests would fix the violations and remove them from .rubocop_todo.yml. You might have to work with a technical writer in some cases.

Tip: To see how many potential offenses we would need to correct ahead of time, you can dump the schema and then use a plain-text search.

Edited by 🤖 GitLab Bot 🤖