Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some lints #1746

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Fix some lints #1746

wants to merge 5 commits into from

Conversation

etiennebacher
Copy link

Hello, I'm building a new package to find and automatically fix lints in R code: flint.

I'm using real-life, large packages to check its performance and rlang is one of them. Since I already test on this, there's no additional cost for me in proposing those changes.

FYI, those changes were generated with flint::fix_package() (with a few corner cases removed by hand because I need to address them in flint).

There are many changes but most of them are trivial:

  • replace any(is.na()) by anyNA()
  • add a leading 0 to decimal (e.g .1 -> 0.1)
  • use expect_named(), expect_null(), and friends in tests
    etc.

flint is quite new and linter rules are necessarily a bit opinionated, so some of those changes might not be to your taste, but I'd be happy to have some feedback on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant