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

[PoC] Chained evaluation for rules #180

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft

Conversation

Anilm3
Copy link
Collaborator

@Anilm3 Anilm3 commented Jun 29, 2023

This is a proof-of-concept of chained evaluation, a feature which allows conditions to evaluate the result of previous conditions.

Currently, the following caveats apply:

  • Testing is non-exhaustive
  • Chained evaluation is not yet supported on exclusion filters
  • The code has many compromises due to time constraints, which might translate into bugs
  • Some structures and caches might have some duplicates
  • Some context-bound structures aren't yet using the context allocator

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2023

Codecov Report

Merging #180 (b98b1a4) into master (4e22824) will decrease coverage by 0.34%.
The diff coverage is 54.76%.

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
- Coverage   64.09%   63.75%   -0.34%     
==========================================
  Files          98      100       +2     
  Lines        3217     3416     +199     
  Branches     1467     1556      +89     
==========================================
+ Hits         2062     2178     +116     
- Misses        277      298      +21     
- Partials      878      940      +62     
Flag Coverage Δ
waf_test 63.75% <54.76%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/condition.hpp 71.42% <ø> (-28.58%) ⬇️
src/iterator.hpp 70.00% <0.00%> (-3.69%) ⬇️
src/parser/specification.hpp 100.00% <ø> (ø)
src/rule.cpp 50.00% <0.00%> (-35.72%) ⬇️
src/ruleset_builder.cpp 47.74% <0.00%> (ø)
src/parser/parser_v1.cpp 23.15% <21.56%> (-2.34%) ⬇️
src/parser/parser_v2.cpp 43.42% <38.46%> (-0.69%) ⬇️
src/expression.cpp 61.84% <61.84%> (ø)
src/expression.hpp 77.35% <77.35%> (ø)
src/condition.cpp 45.28% <100.00%> (-11.33%) ⬇️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

2 participants