Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Add some new predicates #101

Merged
merged 4 commits into from
Oct 12, 2021
Merged

Add some new predicates #101

merged 4 commits into from
Oct 12, 2021

Conversation

lmt-swallow
Copy link
Member

@lmt-swallow lmt-swallow commented Oct 12, 2021

Description

This PR introduces new predicates (match-any-of, not-match-any-of, be-any-of, and not-be-any-of) and change the behaviour of match and not-match to take regex-pattern or regex-patterns as well as pattern or patterns. This change are backward compatible.

Checklist

  • I opened a draft PR or added the [WIP] to the title if my PR is not ready for review.
  • I have reviewed the code by myself.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have added tests enough to show how your code behaves and that your code works as expected.

Additional Notes

N/A

…` attribute + change the behaviour of (not-)match

Signed-off-by: Takashi Yoneuchi <takashi.yoneuchi@shift-js.info>
Signed-off-by: Takashi Yoneuchi <takashi.yoneuchi@shift-js.info>
Signed-off-by: Takashi Yoneuchi <takashi.yoneuchi@shift-js.info>
@lmt-swallow lmt-swallow self-assigned this Oct 12, 2021
@netlify
Copy link

netlify bot commented Oct 12, 2021

✔️ Deploy Preview for cranky-fermi-e6c846 canceled.

🔨 Explore the source changes: 409c7a0

🔍 Inspect the deploy log: https://app.netlify.com/sites/cranky-fermi-e6c846/deploys/6165f525a83e840007e31994

@codecov-commenter
Copy link

Codecov Report

Merging #101 (b60f81d) into main (f6e8b4c) will increase coverage by 0.58%.
The diff coverage is 75.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   73.94%   74.52%   +0.58%     
==========================================
  Files          30       30              
  Lines        1604     1692      +88     
==========================================
+ Hits         1186     1261      +75     
- Misses        418      431      +13     
Impacted Files Coverage Δ
src/cli/tests/ruleset/mod.rs 94.73% <ø> (+4.73%) ⬆️
src/core/constraint.rs 42.85% <47.50%> (-2.31%) ⬇️
src/core/ruleset.rs 65.43% <68.75%> (+3.31%) ⬆️
src/core/matcher/item.rs 85.26% <84.61%> (+9.92%) ⬆️
src/cli/tests/ruleset/generic/mod.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6e8b4c...b60f81d. Read the comment docs.

Signed-off-by: Takashi Yoneuchi <takashi.yoneuchi@shift-js.info>
@lmt-swallow lmt-swallow merged commit 183a075 into main Oct 12, 2021
@lmt-swallow lmt-swallow deleted the feature/either-of branch October 12, 2021 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants