upenn-cis1xx / camelot

A fully-modular OCaml style linter
https://opam.ocaml.org/packages/camelot/
Apache License 2.0
44 stars 5 forks source link

Hof arch addendums #41

Closed Vighnesh-V closed 4 years ago

Vighnesh-V commented 4 years ago

Lints Hofs. Resolves #19

KeenWill commented 4 years ago

It also appears that there are no HOF tests that fail; I assume this is because we haven't written all of the HOF tests yet right?

Vighnesh-V commented 4 years ago

Changes made! This PR just tweaks our architecture a little, to enable us to write different kinds of linter rules over different chunks of the(any) AST. This just lays the foundation to start writing the hof recommendations - I'll do that in another PR.

Vighnesh-V commented 4 years ago

We now also have linting rules for map and iter. Fold is a little more fucky at the moment, probably requiring work with the typed tree.

Vighnesh-V commented 4 years ago

Resolved the issue of distinguishing fold. We now have three rules - one for fold, one for map, one for iter that all work well on obvious cases (definitely more testing needed).

Screen Shot 2020-05-22 at 6 34 00 PM

Resolves #19