Skip to content

Lint framework #1

Closed
Closed

Activity

  1. daroczig commented on Nov 1, 2014

    @daroczig

    parser was built in core R from version 3.0.0 and it has really great features that I use e.g. in my sandboxR package, which also has to check bunch of stuff about user provided R code. Quick demo:

    > getParseData(parse(text = 'library(RColorBrewer)'))
      line1 col1 line2 col2 id parent                token terminal         text
    9     1    1     1   21  9      0                 expr    FALSE             
    1     1    1     1    7  1      3 SYMBOL_FUNCTION_CALL     TRUE      library
    3     1    1     1    7  3      9                 expr    FALSE             
    2     1    8     1    8  2      9                  '('     TRUE            (
    4     1    9     1   20  4      6               SYMBOL     TRUE RColorBrewer
    6     1    9     1   20  6      9                 expr    FALSE             
    5     1   21     1   21  5      9                  ')'     TRUE            )
  2. jimhester commented on Nov 1, 2014

    @jimhester
    MemberAuthor

    Yep I am using the built in parser functions extensively in lintr, this
    issue was just a place for me to keep links to pre-existing linting tools
    On Nov 1, 2014 5:25 PM, "Gergely Daróczi" [email protected] wrote:

    parser was built in core R from version 3.0.0 and it has really great
    features that I use e.g. in my sandboxR package
    https://github.com/Rapporter/sandboxR/tree/r-3.0.0, which also has to
    check bunch of stuff about user provided R code. Quick demo:

    getParseData(parse(text = 'library(RColorBrewer)'))
    line1 col1 line2 col2 id parent token terminal text9 1 1 1 21 9 0 expr FALSE 1 1 1 1 7 1 3 SYMBOL_FUNCTION_CALL TRUE library3 1 1 1 7 3 9 expr FALSE 2 1 8 1 8 2 9 '(' TRUE (4 1 9 1 20 4 6 SYMBOL TRUE RColorBrewer6 1 9 1 20 6 9 expr FALSE 5 1 21 1 21 5 9 ')' TRUE )

    —
    Reply to this email directly or view it on GitHub
    #1 (comment).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions