knip icon indicating copy to clipboard operation
knip copied to clipboard

Add support for GitLab codeowners file

Open angrybacon opened this issue 1 year ago • 2 comments

As per title, are there plans to support GitLab's CODEOWNERS file?

Currently, the codeowner reporter doesn't make it very clear at first glance that it uses the hardcoded .github/ path to look for the CODEOWNERS file. I don't know much about GitHub's CODEOWNERS syntax but from quick testing (cp .gitlab/CODEOWNERS .github/CODEOWNERS) they don't don't appear to be compatible

angrybacon avatar Feb 22 '24 11:02 angrybacon

No plans, but that could change.

Would be helpful to give more pointers as to what's different , etc.

If they would be compatible, you could do something like this:

knip --reporter codeowners --reporter-options '{"path":".gitlab/CODEOWNERS"}'

webpro avatar Feb 22 '24 11:02 webpro

I just tried simply removing the sections headers from my CODEOWNERS and it seemed to work 👍

Mostly I wanted to test out what the codeowner output looked like and whether that would allow me to filter the output (I come from #518, as you might have guessed by now)

angrybacon avatar Feb 22 '24 11:02 angrybacon