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

Use flint "to find and replace lints in R code" #611

Open
SaintRod opened this issue Aug 31, 2024 · 0 comments
Open

Use flint "to find and replace lints in R code" #611

SaintRod opened this issue Aug 31, 2024 · 0 comments
Labels
status: triage Awaiting review and labeling by a core developer

Comments

@SaintRod
Copy link

Motivation

Hi, all:

As always, thanks for the great work on Rhino.

I recently heard of a package called flint. Flint is similar to lintr, however, from the flint documentation, "lintr’s performance is not optimal when it is applied on medium to large packages. Also, lintr cannot perform automatic replacement of lints."

Feature request: Automatically fix lints

repo: https://github.com/etiennebacher/flint

Feature description

Lintr highlights lints but relies on the developer to fix them. Automating fixing some of the lints would be quite nice.

Implementation ideas

Either:

  1. Create a new function, such as flint_r()
  2. Update lint_r to include flint::fix() functionality to automatically address lints

I think option 2 makes more sense. Perhaps run flint::fix to fix lints and then run lintr to highlight which lints remain

Impact

Lintr is great but it doesn't automatically fix lints, flint does, which saves time. It's not the end of the world if flint isn't incorporated, but automation is great, and fixing lints by default vs opting in or fixing lints manually helps ensure greater code quality.

One thing to note is that there isn't 100% overlap between flint and lintr so developers would still have to manually fix lints not addressed by flint

Comments

Thanks for your consideration

@SaintRod SaintRod added the status: triage Awaiting review and labeling by a core developer label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage Awaiting review and labeling by a core developer
Projects
None yet
Development

No branches or pull requests

1 participant