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

Add support for allowed exception rules in AdBlock format #225

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

henrikwidlund
Copy link
Owner

Description

This update introduces the ability to handle allowed exception rules in AdBlock formatted files. In the AdBlock norm, '@@' at the beginning of the rule means it is an exception. The code is updated to recognize these rules, process them separately, and store them in a new HashSet variable. This will distinguish which Domain Name System (DNS) requests to allow, enhancing the utility's flexibility and control over network traffic rules. The adjustment is accompanied by necessary changes in the tests, improving our project's robustness against future modifications.

PR Type

  • New feature
  • Bug fix
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Unit tests
  • Branch merge
  • Docs
  • Other (please describe in description)

Fixes Issue(s)

This update introduces the ability to handle allowed exception rules in AdBlock formatted files. In the AdBlock norm, '@@' at the beginning of the rule means it is an exception. The code is updated to recognize these rules, process them separately, and store them in a new HashSet<string> variable. This will distinguish which Domain Name System (DNS) requests to allow, enhancing the utility's flexibility and control over network traffic rules. The adjustment is accompanied by necessary changes in the tests, improving our project's robustness against future modifications.
@henrikwidlund henrikwidlund added the enhancement New feature or request label Oct 5, 2023
@henrikwidlund henrikwidlund self-assigned this Oct 5, 2023
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (26363fb) 78.40% compared to head (c10d2c2) 76.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
- Coverage   78.40%   76.36%   -2.05%     
==========================================
  Files           7        7              
  Lines         440      457      +17     
  Branches       67       71       +4     
==========================================
+ Hits          345      349       +4     
- Misses         82       95      +13     
  Partials       13       13              
Flag Coverage Δ
unittests 76.36% <46.66%> (-2.05%) ⬇️

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

Files Coverage Δ
src/HostsParser/Constants.cs 100.00% <ø> (ø)
src/HostsParser/HostUtilities.cs 91.27% <100.00%> (+0.24%) ⬆️
src/HostsParser/ExecutionUtilities.cs 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henrikwidlund henrikwidlund merged commit 0b9c508 into main Oct 5, 2023
5 of 7 checks passed
@henrikwidlund henrikwidlund deleted the feature/support_allow_overrides branch October 5, 2023 18: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.

None yet

1 participant