Skip to content

styler fails on testthat #240

Closed
Closed

Description

@hadley
> styler:::style_pkg()
Styling 127 files:
R/auto-test.R.                                    [DONE]
R/capture-condition.R.                            [DONE]
R/capture-output.R.                               [DONE]
R/colour-text.R.                                  [DONE]
R/compare-character.R.                            [DONE]
R/compare-numeric.R.                              [DONE]
....

But

> warnings()
Warning messages:
1: When processing R/auto-test.R: missing value where TRUE/FALSE needed
2: When processing R/capture-condition.R: missing value where TRUE/FALSE needed
3: When processing R/capture-output.R: missing value where TRUE/FALSE needed
4: When processing R/colour-text.R: missing value where TRUE/FALSE needed
5: When processing R/compare-character.R: missing value where TRUE/FALSE needed
6: When processing R/compare-numeric.R: missing value where TRUE/FALSE needed
7: When processing R/compare-time.R: missing value where TRUE/FALSE needed
8: When processing R/compare.R: missing value where TRUE/FALSE needed
9: When processing R/context.R: missing value where TRUE/FALSE needed
10: When processing R/describe.R: missing value where TRUE/FALSE needed
11: When processing R/evaluate-promise.R: missing value where TRUE/FALSE needed
12: When processing R/expect-comparison.R: missing value where TRUE/FALSE needed
...

Activity

  1. lorenzwalthert commented on Oct 12, 2017

    @lorenzwalthert
    Collaborator

    I attempted to fix this in #242. The issue seemed to be related to inserting curly braces in statements like

    if (TRUE) 
      return(xyz)

    I have styled the package testthat successfully locally.

  2. added this to the milestone on Oct 12, 2017
  3. hadley commented on Oct 13, 2017

    @hadley
    MemberAuthor

    Thanks!

  4. lorenzwalthert commented on Oct 23, 2017

    @lorenzwalthert
    Collaborator

    I assume this can be closed then.

  5. hadley commented on Oct 23, 2017

    @hadley
    MemberAuthor

    Running on testthat does expose a few issues in styler. I'll try and find some time to file issues here.

  6. lorenzwalthert commented on Oct 23, 2017

    @lorenzwalthert
    Collaborator

    I would definitively appreciate that. If you don't find time, I may have a closer look myself to try to find some of these issues.

  7. lorenzwalthert commented on Nov 25, 2017

    @lorenzwalthert
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions