Skip to content

refactor: remove rules #24

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

Merged
merged 6 commits into from
Jun 12, 2025

Conversation

Agustindeleon
Copy link
Contributor

  • Separate "remove" rules to generate independent events at the listener level
  • Change int_range from a token to a parser rule in order to use the start and the end of range as integers

@theseion
Copy link
Contributor

Looks good, haven't tested it myself.

@theseion
Copy link
Contributor

Actually, could you please add a test for the modified functionality @Agustindeleon?

Copy link
Contributor

@theseion theseion left a comment

Choose a reason for hiding this comment

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

Add test for changed functionality

@Agustindeleon
Copy link
Contributor Author

Actually, there are some simple test cases for these kinds of directives that ensure that the lexer and parser don't throw errors during their execution.

@fzipi fzipi changed the title Refactor: Remove rules refactor: remove rules Mar 17, 2025
@theseion
Copy link
Contributor

Actually, there are some simple test cases for these kinds of directives that ensure that the lexer and parser don't throw errors during their execution.

I know. But "no error" is not the same as "produces the correct output". The test coverage is still too low for my taste, and your change is a great chance to improve test coverage. The new test would also document the expected behaviour of the parser.

@fzipi
Copy link
Member

fzipi commented Jun 6, 2025

@Agustindeleon Can you add more tests somehow?

@Agustindeleon
Copy link
Contributor Author

Hi @theseion @fzipi, can you take a look at the code and the test added? I think it would be a good idea to move all listener stuff to the new listener.go file, but maybe it's better to do that in a separate branch.

@fzipi fzipi requested a review from theseion June 10, 2025 20:14
Copy link
Contributor

@theseion theseion left a comment

Choose a reason for hiding this comment

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

Good stuff!

@theseion
Copy link
Contributor

Hi @theseion @fzipi, can you take a look at the code and the test added? I think it would be a good idea to move all listener stuff to the new listener.go file, but maybe it's better to do that in a separate branch.

I agree. Separate PR.

@theseion theseion merged commit d6d233e into coreruleset:main Jun 12, 2025
1 check passed
@Agustindeleon Agustindeleon deleted the refactor/removeRules branch June 14, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants