[BugFix]: Addressing issues with parsing newline characters on windows for conjunctions #482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
After addressing the clippy lints mentioned below integration tests against the rules registry started to fail due to newly added tests that include conjunctions on the when clauses of some rules. These failures occurred only in windows and it was due to using nom's builtin newline parsing function. To address this issue I created our own internal newline parsing function that alt's between the 2 possible escape sequences on windows and *nix systems.
With the recent release of Rust 1.77 new lints were introduced, some caused failures in our CI. I have explicitly ignored most of the areas where this was causing our CI to fail, because we may want to use these unused variants in the future.
I chose to ignore all the occurrences of these failures in our internal libyaml crate incase we decide to start using those unused variants.
For the clauses function it is currently unused, but instead of removing it I am taking it as an action item upon myself to investigate why its unused. There has been cases in the past where unused implemented code was there for a reason (i.e. partly implemented feature).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license