-
Notifications
You must be signed in to change notification settings - Fork 56
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
More checks #10
Comments
|
|
One of the "big code-smells" to me are view function that take in the whole model to print e.g. one field. This makes the view function very "potent". |
While I definitely agree with the second point, I do want to note that the first one seems in direct conflict with the noRedInk elm-style-guide which makes a decent case for There's also the case to be made for eschewing overly point free code in performance critical code (say the inner loops of datastructure manipulation), though that's more relevant for library code as opposed to application code. Sort of going on a tangent here, but I just realized that you'll be able to differentiate between application bundles and library code in 0.19. Might want to create slightly different presets for those.. |
@zwilias Thanks for pointing that out. This kind of information is valuable :). |
#89 requests a warning on excessively indented code. |
Another simple metric to check is to count the number of lines in modules and functions. More than once I have found myself trying to understand code from others with files with thousands of lines and functions with hundreds of lines. I like the way how plato shows that info and the complexity of the code. |
Matthew Buscemi just published an Atom plugin, elm-lens, which (among other things) warns about items that are exposed but not externally referenced.
This might be a case where applications and libraries should be treated differently. |
E.g. I have Good
Bad
|
List.concat
when concatenating only fixed size lists.N
fields. (Record type aliases should be formatted multiline when exceeding N fields #24)Undocumented function that is exposed by module.Use point free notation where possible (\_ -> b
toalways b
and\x -> List.map f x
toList.map f
)++
.elm-lang/*
orelm-community/*
.The text was updated successfully, but these errors were encountered: