Syntax highlighting for CODEOWNERS file type in Source Editor
What does this MR do and why?
This MR introduces the first step in supporting the CODEOWNERS
file type with the following:
- syntax highlighting
- automatically closing the square brackets (
[
) when creating a section
Syntax highlighting is supported by all the "Syntax highlighting theme" options in the product.
Screenshots or screen recordings
Theme | Result |
---|---|
Light | ![]() |
Dark | ![]() |
Solarized Light | ![]() |
Solarized Dark | ![]() |
Monokai | ![]() |
None | ![]() |
How to set up and validate locally
Either open an existing CODEOWNERS
file and check the highlighting, or create a new one and try adding content. For simplicity and speed, you can paste the following snippet:
# When adding a group as a code owner, make sure to invite the group to the
# project here: https://gitlab.com/gitlab-org/gitlab/-/project_members
# As described in https://docs.gitlab.com/ee/user/project/code_owners.html
* @gitlab-org/maintainers/rails-backend @gitlab-org/maintainers/frontend @gitlab-org/maintainers/database @gl-quality/qe-maintainers @gl-quality/tooling-maintainers @gitlab-org/delivery @gitlab-org/maintainers/cicd-templates @nolith @jacobvosmaer-gitlab @gitlab-org/tw-leadership
CODEOWNERS @gitlab-org/development-leaders @gitlab-org/tw-leadership
docs/CODEOWNERS @gitlab-org/development-leaders @gitlab-org/tw-leadership
.gitlab/CODEOWNERS @gitlab-org/development-leaders @gitlab-org/tw-leadership
## Allows release tooling to update the Gitaly Version
GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend @gitlab-org/delivery
## Files that are excluded from required approval
/.gitlab/issue_templates/*.md
/.gitlab/merge_request_templates/*.md
/doc/*.md
/doc/**/*.md
/doc/**/*.jpg
/doc/**/*.png
/data/deprecations/*.yml
/data/removals/**/*.yml
^[Source code editing]
.solargraph.yml.example @igor.drozdov
^[Backend]
*.rb @gitlab-org/maintainers/rails-backend
*.rake @gitlab-org/maintainers/rails-backend
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #393949 (closed)
Edited by Denys Mishunov