Create API/EndpointDeprecation linter to enforce deprecation style guide

Summary

Create a new RuboCop linter API/EndpointDeprecation to enforce the API deprecation style guide.

Background

Following !214743 (merged) and !214914 (merged), we have a clear style guide for marking API endpoints as deprecated using the deprecated: true flag. However, many instances still mention deprecation in descriptions instead of using the proper flag.

Proposal

Create a linter that:

  1. Checks both desc and detail for mentions of "deprecated" (patterns like [DEPRECATED]:, [Deprecated], (deprecated), etc.)
  2. Ensures the proper deprecated: true flag is used instead
  3. Scans endpoint definitions in lib/api
Edited by 🤖 GitLab Bot 🤖