Add detected language objects
What does this MR do and why?
Gitlab::LanguageDetection exposes detected language fields
through name-based helper methods. This makes later language matching
changes harder to express without passing names between helpers.
This MR:
- Adds
Gitlab::LanguageDetection::DetectedLanguage. - Exposes detected language values through
#detected_languages. - Keeps existing name-based helpers behavior-compatible.
- Adds specs for detected language objects and color lookup.
References
How to set up and validate locally
-
Run the targeted specs:
bin/rspec spec/lib/gitlab/language_detection_spec.rb -
Run RuboCop:
bundle exec rubocop lib/gitlab/language_detection.rb spec/lib/gitlab/language_detection_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Vasilii Iakliushin