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

rule(Write below root): use pmatch to check against known root direct… #1137

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

Kaizhe
Copy link
Contributor

@Kaizhe Kaizhe commented Apr 9, 2020

…ories

Signed-off-by: kaizhe derek0405@gmail.com

What type of PR is this?

/kind rule-update

Any specific area of the project related to this PR?

/area rules

What this PR does / why we need it:

When check against directories, we want to also check the subdirectories as well, so in is not the best option, use pmatch instead.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

rule(Write below root): use pmatch to check against known root directories

…ories

Signed-off-by: kaizhe <derek0405@gmail.com>
@poiana poiana requested review from leodido and mfdii April 9, 2020 00:28
@poiana poiana added the size/XS label Apr 9, 2020
@Kaizhe Kaizhe requested review from mstemm and removed request for mfdii April 9, 2020 00:28
Copy link
Contributor

@mstemm mstemm left a comment

Choose a reason for hiding this comment

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

Lgtm. This does allow for additional exceptions, though, as the entire directory rooted for each entry in known_root_directories can be written to at arbitrary depths. I guess it's easier than trying to match the directory structure for those apps that write more than one file deep below a given directory, though.

@poiana
Copy link

poiana commented Apr 9, 2020

LGTM label has been added.

Git tree hash: e49eebc46e2174ad9c894552a595e4dd2c68c861

@poiana poiana added the approved label Apr 9, 2020
@fntlnz
Copy link
Contributor

fntlnz commented Apr 9, 2020

I agree with @mstemm however this looks like a necessary evil for now since we don't really have a way to map everything.

Copy link
Member

@leodido leodido left a comment

Choose a reason for hiding this comment

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

LGTM.

Reasonable and needed, thanks Khaize.

Copy link
Contributor

@fntlnz fntlnz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Kaizhe

@poiana
Copy link

poiana commented Apr 9, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leodido, mstemm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@leodido
Copy link
Member

leodido commented Apr 9, 2020

/milestone 0.22.0

@poiana poiana added this to the 0.22.0 milestone Apr 9, 2020
@poiana poiana merged commit 1548ccb into master Apr 9, 2020
@poiana poiana deleted the kh_use-pmatch-for-dir-check branch April 9, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants