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:
- Checks both
descanddetailfor mentions of "deprecated" (patterns like[DEPRECATED]:,[Deprecated],(deprecated), etc.) - Ensures the proper
deprecated: trueflag is used instead - Scans endpoint definitions in
lib/api
Related
- Related to #581045 (closed)
- Follow-up from !214743 (merged)
- Style guide in !214914 (merged)
- Epic: gitlab-org/quality&231
Edited by 🤖 GitLab Bot 🤖