codeowners
codeowners copied to clipboard
Support for sections (Gitlab flavor)
The Gitlab documentation allows to introduce sections into the CODEOWNERS
such as
[README Owners]
README.md @user1 @user2
internal/README.md @user2
That enables Gitlab to show the code ownership within the UI a little bit nicer. Currently, running this tool (version 1.1.1) on such a file leads to the following error:
$ codeowners
line 1: unexpected character '[' at position 1
Would you be willing to allow support for this? Would you accept a PR for that (I haven't looked into the code yet though)
I'd be open to this, but as long as it's only enabled by passing in a flag (or by detecting the CODEOWNERS file in the .gitlab
directory, perhaps). As this package is designed primarily to work with GitHub CODEOWNERS files, I'd rather it defaults to erroring loudly when it encounters invalid syntax.
Just mentioning: came here for the same reason as the author of this issue. I would be also interested in a gitlab compatible solution (supporting/ignoring these sections).