Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore trailing whitespace in rules #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lukealbao
Copy link

There's a small bug in the rule parser that is replicated in the test here. Trailing whitespace is insignificant in Github's implementation.

@@ -63,7 +63,7 @@ export class OwnershipEngine {

const createMatcherCodeownersRule = (rule: string): FileOwnershipMatcher => {
// Split apart on spaces
const parts = rule.split(/\s+/);
const parts = rule.split(/\s+/).filter(Boolean);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just use .trim(), makes it more readable

@nadavsinai-philips
Copy link

we also had this problem, I wanted to make a PR and found this one already exists
thanks for your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants