ISLE: Enable the overlap checker - #5011
Merged
elliottt merged 2 commits intoOct 4, 2022
Merged
Conversation
elliottt
force-pushed
the
trevor/enable-overlap-checking
branch
from
October 4, 2022 20:25
6a84d46 to
b7e781c
Compare
elliottt
force-pushed
the
trevor/enable-overlap-checking
branch
from
October 4, 2022 20:29
b7e781c to
cfa6139
Compare
cfallin
approved these changes
Oct 4, 2022
| /// Enable overlap errors in the source. | ||
| OverlapErrors, | ||
| } | ||
| pub enum Pragma {} |
Member
There was a problem hiding this comment.
Can we put a comment here stating that currently no pragmas are defined (but the infrastructure remains from past pragmas and we are choosing to retain it to easily support future ones)? Otherwise this might look a bit odd to a new reader with no context.
| match ident.0.as_ref() { | ||
| "overlap_errors" => Ok(Pragma::OverlapErrors), | ||
| _ => Err(self.error(ident.1, format!("Unknown pragma '{}'", ident.0))), | ||
| // currently, no pragmas are defined, but the infrastructure is useful to keep around |
Member
There was a problem hiding this comment.
... ah, and I see you have exactly that comment here :-) (Mentioning this in both places is still good, I think.)
Member
Author
There was a problem hiding this comment.
I'll copy this one over to the enum definition as well, thanks for catching that!
elliottt
enabled auto-merge (squash)
October 4, 2022 21:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR turns the overlap checker on by default, requiring the use of priorities to resolve overlap between rules.
Additionally, I removed the
overlap_errorspragma leaving the rest of the pragma parsing framework in place, and resolved overlaps in the isle tests.