Writing a R lint program -
when program in python, find using pylint useful. however, when program in r, there nothing comparable.
as small side project, thought fun try , write small lint program. nothing fancy, along lines of:
- making sure function names camel case
- average function length
- detecting unused variables
- spacing. example,
function(x=1, y=2)
instead offunction(x=1,y=2)
however, i'm unsure of how started (i have started through pylint soure code).
how should started? there standard programming techniques type of project? resources should consider?
i write entire project in r.
take @ package codetools
comes r. details found on cran page package. code in package run when r cmd check
example can catch unused variables etc. might started on aspect of rlint
.
to answer of other aspects... i'd start of writing simple functions 1 task, such convert functions names camel case. build body of small functions can amalgamate them working lint wrapper function, whilst allowing users/developers flexibility call specific functions if don't want full lint behaviour.
Comments
Post a Comment