Add YARD annotations to remote dev shared contexts
What does this MR do and why?
- Adds missing YARD annotations to
ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb - Splits one method into two to avoid having two different return types
NOTES:
- This is just a spec helper file, and we are just adding YARD annotations to avoid all the warnings in RubyMine, but it is useful because it already caught the problem with the multiple return types antipattern.
- AI was used to generate the original text, and I reviewed it and fixed some problems. There may be some minor inconsistencies with the actual types, but again this is just a spec helper file, it doesn't have to be perfect.
- If, in the future, we add Sorbet or RBS, we will have much stronger mechanisms to detect and enforce type problems. But for now, we do the best we can with YARD.
References
- Official docs recommending usage of YARD: https://docs.gitlab.com/17.9/development/code_comments/#class-and-method-documentation
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.