-
Notifications
You must be signed in to change notification settings - Fork 26
Style Guidelines
PhilippBach edited this page Nov 23, 2021
·
6 revisions
Use styler
"mlr-style"
So far there's not yet a styler
customized to DoubleML
. Currently, we stick to the "mlr-style" used by mlr3
.
- Install the
styler
package with "mlr-style". Installation guidelines can be found in the mlr3 style guide.
remotes::install_github("pat-s/styler@mlr-style")
- Once you are done with your changes, run the call
styler::style_pkg(style = styler::mlr_style)
(applied to entire package) or
styler::style_file(<file>, style = styler::mlr_style)
(applied to a specific file).
- Check your code with the
lintr
package using the calllintr::lint(<file>)
orlintr::lint_package()
.
Generally, do not use ::
to refer to imported packages. Only use ::
for suggested packages or if function names are not unique.
Note: DoubleML
is still at a fairly early stage of development. This styleguide will therefore be up do changes and is still open for discussion.
Acknowledgement: We would like to thank the developers of mlr3
for setting up the "mlr3-style" and their helpful style guide.