-
Notifications
You must be signed in to change notification settings - Fork 4
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
racket-analysis #5
Comments
Oh, and another rule is to catch
because people are also mistaken that the first case will match the empty list, but in fact it will bind |
I think those would be good to add; I've definitely run into both problems. If you feel like it, you could try adding those rules to get familiar w/ how review works. Be warned, though, the implementation isn't as good as it should be. The reason I originally implemented this as a surface-level only thing was because I wanted it to be fast, but I think I had a mistaken idea about how slow expanding individual modules on the fly would really be. Since Greg added I think that, ideally, a linter like this would have two modes: one where it searches for stylistic issues by only looking at surface syntax, like review does right now (minus the parts where it tries to keep track of scope) and another, deeper mode where it expands things and looks for potential bugs. It'd perform the analyses one after the other and report problems as soon as it finds them, which would preserve the speed for the most part. The split would likely improve the code and it would make it much easier to support custom syntax (which review doesn't do at all right now -- I just have various rules for macros I use often). If that seems like a good direction to you, I think it'd be great to collaborate. |
I will add the rules to detect both problems tonight. My immediate goal is to analyze the Racket codebase itself as a part of the CI process, so I think I will keep working on |
I created yet another linter, unaware that your project already existed. It analyzes the expanded code, so it has an access to binding informations, allowing one to discover issues like invalid
(cond [else ...])
whenelse
is not bound toelse
fromracket
(even though symbolically this looks correct).My plan was to rewrite the whole thing all over again, because the current code has some fundamental flaws. But seeing that this project already exists, I don't want to make a duplicate effort. Do you plan to support analyzing expanded code? If so, it might make more sense to join the efforts somehow rather than creating yet another separate tool.
By the way, there's another rule from
racket-analysis
that can be readily added to your current framework. Sometimes people write:But this is equivalent to:
which is probably not what they intend.
The text was updated successfully, but these errors were encountered: