Skip to content

Conversation

@drgs
Copy link

@drgs drgs commented Aug 28, 2022

Motivation

Sometimes we might need to check whether a repository contains at least one directory or file whose name matches a certain regular expression. Although file-existence and directory-existence rules exist, these two can not be combined within one single rule.

Proposed Changes

This PR implements a file-or-directory-existence rule which aims at checking whether there is at least one file or directory specified in globsAny whose name matches a regular expression.

Test Plan

  • it returns a passed result if both files and directories exist matching the given pattern
  • it returns a passed result if only files exist matching the given pattern
  • it returns a passed result if only directories exist matching the given pattern
  • it returns a failed result if neither files or directories exist matching the given pattern

@drgs drgs force-pushed the feature/add-file-or-directory-exists-rule branch from 5741a49 to 0e0152a Compare August 29, 2022 12:55
@drgs drgs requested a review from Brend-Smits August 29, 2022 22:20
@drgs drgs self-assigned this Aug 29, 2022
@drgs drgs added the enhancement New feature or request label Aug 29, 2022
@drgs drgs changed the title Add file-or-directory-exists rule Add file-or-directory-existence rule Aug 29, 2022
@drgs drgs marked this pull request as ready for review August 29, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants