RuboCop: Add autocorrect to replace "this" with "the" in Graphql/Descriptions

Problem

The cop Graphql/Descriptions can currently auto-correct the missing full stop at the end of a sentence. This auto-correction lead to a infinite loop when running rubocop -a --only Graphql/Descriptions. This will be addressed by MR !105561 (merged) soon . The remaining tasks include:

  • Adding auto-correction to replace "this" with "the", which can be done using Corrector#replace.
  • Fixing 200 offenses for Graphql/Descriptions. This has to be done manually with the help of a technical writer to ensure proper grammar is maintained and must be addressed in a separate issue (separate issue created at #384323 (closed)).

Proposed solution

Make use of Corrector#replace to replace "this" with "the".

Prior discussions

The following discussion from #324114 (closed) should be addressed:

  • @splattael started a discussion: (+2 comments)

    Question (non-blocking) It seems this cop does support autocorrect only for appending the full stop at the end of an sentence.

    I wonder what happens if the cops complains about, say, "this". Does it append the full stop anyway when used with rubocop -a? 🤔

    Moreover, we could autocorrect this to the 🤷

    Again, non-blocking and just a thought for future us.

Pinging @splattael for labels.

Edited by Ashvith