nmusolino / codeowners

Tool for identifying the owners of files under Github's CODEOWNERS feature.
GNU General Public License v3.0
2 stars 1 forks source link

Support recursion in the CODEOWNERS file. #3

Closed shaleh closed 4 years ago

shaleh commented 4 years ago

Uses pattern.match and os.path.

nmusolino commented 4 years ago

Thank you, ashaleh, for your MR. I apologize for not responding earlier.

Would you be able to update the test for this? There is a test currently marked xfail. Does that test pass after your change?

I would normally be able to check myself, but I have limited access to my dev machine during a Coronavirus lockdown.

shaleh commented 4 years ago

@nmusolino I will give it a look. Thanks for a pointer to more tests.

shaleh commented 4 years ago

Yay for inconsistent Python docs.

match on pathlib does not recurse. glob does. So I can make this work with real files on a real disk but it would not support simply asking "does this string this glob". Fun.

shaleh commented 4 years ago

I will ponder this and get back to you.

shaleh commented 4 years ago

@nmusolino fnmatch does not support recursion. glob does, but only with real file paths on the real filesystem. So instead I made a regex check. I am testing this locally, but the unit tests are passing.