-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Generalize matching #226
Comments
Some proposed new inspections that we should implement are:
|
The problem with this issue is that it will become really difficult to express the inspections using the current
So we will need to accept at least one of the following: A more complex json structure:{
intransitive: bool,
scope: ("*" | string),
negated: bool,
verb: string,
target: string,
matcher: { with: string } | { that: expectation } | { thatAll: [expectation] } | { thatAny: [ expectation] }
} A more natural-language-like syntax
|
Also, we will need to generalize arguments-passing to verbs, in order to be able to create assertions like
|
Also, we should create new versions for many of the existing inspections, i.e: -- | Inspection that tells whether an expression uses ifs
-- in its definition
usesIf :: Inspection
usesIf = unmatching usesIfMatching
usesIfMatching :: Matcher -> Inspection
usesIfMatching matcher = containsExpression f
where f (If cond true false) = matcher [true, cond, false]
f _ = False |
Fixed by #241 |
It would be nice that we were able to use inspections inside inspections.
Something like:
This feature is the natural next-step to #225, since
The text was updated successfully, but these errors were encountered: