Como-DTC-Collaboration / como-models

Pedagogical materials for learning COVID-19 transmission dynamics modelling
https://Como-DTC-Collaboration.github.io/como-models/
MIT License
3 stars 0 forks source link

Add lintr style check #12

Closed rccreswell closed 3 years ago

rccreswell commented 3 years ago

Closes #11 Closes #13

rccreswell commented 3 years ago

This workflow adds the same lintr checks we are using in comoDTC. In this default configuration, style problems don't necessarily cause the check to fail. Most of the transgressions just get a warning comment in the PR code.

@ben18785 if you'd like to make it stricter so it fails the check when style problems are present, I think I can easily do that with the expect_lint_free function.

ben18785 commented 3 years ago

Thanks @rcw5890 -- that's great. Given that style fails don't cause fails, how about adding a Github PR template that adds a checkbox asking if a person has done style checks via Lintr?

rccreswell commented 3 years ago

Thanks @rcw5890 -- that's great. Given that style fails don't cause fails, how about adding a Github PR template that adds a checkbox asking if a person has done style checks via Lintr?

I put down a first attempt for the template---it mentions the style check and several other things that came to mind.