mrc-ide / odin

ᚩ A DSL for describing and solving differential equations in R
https://mrc-ide.github.io/odin
Other
102 stars 12 forks source link

Fix lint #276

Closed richfitz closed 1 year ago

richfitz commented 1 year ago

The new version of lintr changes behaviour of some linters, this PR fixes the newly reported lint.

I'm not a huge fan of the requirement for braces on anonymous functions, but there's no way of selectively turning that part off. The nolint tags for the 1:x expressions are because they never get evaluated by R but get used as part of the DSL so we need them to use the 1:x form, not the seq_len(x) form

codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (0881ac1) compared to base (35d1847). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #276 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 45 45 Lines 5247 5253 +6 ========================================= + Hits 5247 5253 +6 ``` | [Impacted Files](https://codecov.io/gh/mrc-ide/odin/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide) | Coverage Δ | | |---|---|---| | [R/dependencies.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9kZXBlbmRlbmNpZXMuUg==) | `100.00% <100.00%> (ø)` | | | [R/generate\_c\_compiled.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9jX2NvbXBpbGVkLlI=) | `100.00% <100.00%> (ø)` | | | [R/generate\_c\_equation.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9jX2VxdWF0aW9uLlI=) | `100.00% <100.00%> (ø)` | | | [R/generate\_c\_support.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9jX3N1cHBvcnQuUg==) | `100.00% <100.00%> (ø)` | | | [R/generate\_js.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9qcy5S) | `100.00% <100.00%> (ø)` | | | [R/generate\_js\_equation.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9qc19lcXVhdGlvbi5S) | `100.00% <100.00%> (ø)` | | | [R/generate\_r.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9yLlI=) | `100.00% <100.00%> (ø)` | | | [R/generate\_r\_equation.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9nZW5lcmF0ZV9yX2VxdWF0aW9uLlI=) | `100.00% <100.00%> (ø)` | | | [R/ir\_parse.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9pcl9wYXJzZS5S) | `100.00% <100.00%> (ø)` | | | [R/ir\_parse\_arrays.R](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide#diff-Ui9pcl9wYXJzZV9hcnJheXMuUg==) | `100.00% <100.00%> (ø)` | | | ... and [5 more](https://codecov.io/gh/mrc-ide/odin/pull/276/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mrc-ide)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.