We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
func strconv(m dsl.Matcher) { m.Match(`fmt.Sprintf("%d", $x)`).Where(m["x"].Type.Is(`int`)).Suggest(`strconv.Atoi($x)`) m.Match(`fmt.Sprintf("%d", $x)`). Where(m["x"].Type.Is(`int64`)). Suggest(`strconv.FormatInt($x, 10)`) m.Match(`fmt.Sprintf("%d", $x)`). Where(m["x"].Type.OfKind(`int`)). Suggest(`strconv.FormatInt(int64($x), 10)`) m.Match(`fmt.Sprintf("%d", $x)`). Where(m["x"].Type.OfKind(`uint`)). Suggest(`strconv.FormatUint(uint64($x), 10)`) }
In the example above, we have 4 rules that have identical syntax patterns. We should be able to merge them and branch by their filter conditions.
syntax pattern 1 -- filter 1 -- action 1 -- filter 2 -- action 2 -- filter 3 -- action 3 -- filter 4 -- action 4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the example above, we have 4 rules that have identical syntax patterns.
We should be able to merge them and branch by their filter conditions.
The text was updated successfully, but these errors were encountered: