Skip to content

False-positive object_name_linter for %<-% #495

Closed

Description

@bersbersbers

This line

`%<-%` <- zeallot::`%<-%`

raises

Variable and function name style should be snake_case.

Activity

  1. russHyde commented on Dec 9, 2020

    @russHyde
    Collaborator

    @bersbersbers could you check if this is still an issue when using the current master. The object-name linter used by the default_linters has been modified to allow symbol-names.

  2. russHyde commented on Dec 9, 2020

    @russHyde
    Collaborator

    Cross-ref #677

  3. added
    bug
    on Dec 9, 2020
  4. bersbersbers commented on Dec 9, 2020

    @bersbersbers
    Author

    Does not work:

    > Rscript -e 'devtools::install_github("https://github.com/jimhester/lintr", force=T)'
    Downloading GitHub repo jimhester/lintr@HEAD
    
    ✔  checking for file ‘/tmp/Rtmpuvgv6n/remotes56b02395a43a/jimhester-lintr-e759d2a/DESCRIPTION’ ...
    ─  preparing ‘lintr’:
    ✔  checking DESCRIPTION meta-information ...
    ─  installing the package to process help pages
    ─  checking for LF line-endings in source and make files and shell scripts (3.5s)
    ─  checking for empty or unneeded directories
    ─  building ‘lintr_2.0.1.9000.tar.gz’
       Warning: invalid uid value replaced by that for user 'nobody'
       
    * installing *source* package ‘lintr’ ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (lintr)
    > echo "\`%<-%\` <- zeallot::\`%<-%\`" > bug.R
    > Rscript -e 'lintr::lint("bug.R")'
    /home/bers/bug.R:1:1: style: Variable and function name style should be snake_case or symbols.
    `%<-%` <- zeallot::`%<-%`
    
  5. AshesITR commented on Dec 9, 2020

    @AshesITR
    Collaborator

    Thanks for trying. This should conform to the new symbols style, so that regex needs fixing 😄

  6. added a commit that references this issue on Dec 9, 2020
    3400040
  7. bersbersbers commented on Dec 9, 2020

    @bersbersbers
    Author

    Works after

    Rscript -e 'devtools::install_github("https://github.com/jimhester/lintr/pull/698")'
    
  8. MichaelChirico commented on Dec 10, 2020

    @MichaelChirico
    Collaborator

    Great! Closing

  9. MichaelChirico commented on Dec 10, 2020

    @MichaelChirico
    Collaborator

    Oh. I can't read.

  10. added a commit that references this issue on Dec 11, 2020
    fe06c18
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions