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

Box trailing commas linter #535

Merged
merged 25 commits into from
Feb 7, 2024
Merged

Conversation

radbasa
Copy link
Contributor

@radbasa radbasa commented Jan 11, 2024

Changes

  • Closes Box trailing commas linter #534
  • Adds a box_trailing_commas_linter()
  • Adds the linter to the .lintr template
  • Adds documentation
  • Added a check_functions = c(TRUE, FALSE) argument.

How to test

  1. Unit tests for box_trailing_commas_linter() exist
  2. Locally install rhino, version should be 1.6.0.9002, initialize a new rhino application then proceed to declare box imports.
  3. rhino::lint_r() should find and point to all package, module, function imports without a trailing comma.
  4. Or, with an existing rhino app, add box_trailing_commas_linter = rhino::box_trailing_commas_linter() to .lintr.
  5. rhino::lint_r() should find and point to all package, module, function imports without a trailing comma.

Known issues

> devtools::document()
ℹ Loading rhino
Warning message:
[linter_box_trailing_commas_linter.R:7] @examples has mismatched braces or quotes 

I believe it sees the trailing commas in the example and complains.

@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d9da2b0) 20.85% compared to head (ba2a90d) 26.91%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
+ Coverage   20.85%   26.91%   +6.06%     
==========================================
  Files          10       10              
  Lines         422      457      +35     
==========================================
+ Hits           88      123      +35     
  Misses        334      334              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@radbasa
Copy link
Contributor Author

radbasa commented Jan 11, 2024

Add argument flag for bracket trailing commas. Default to FALSE.

* update rhino app template unit test

* update e2etest app files

* remove what looks like stylr styling
@radbasa
Copy link
Contributor Author

radbasa commented Jan 12, 2024

> devtools::document()
ℹ Updating rhino documentation
ℹ Loading rhino
Warning message:
[linter_box_trailing_commas_linter.R:10] @examples has mismatched braces or quotes 

@radbasa radbasa marked this pull request as ready for review January 12, 2024 07:52
@radbasa radbasa requested a review from jakubnowicki January 12, 2024 08:01
* box universal import linter

* add box_universal_import_linter to .lintr template

* documentation

* package housekeeping

* removed some lint

* namespace box_universal_import_linter

* reordered Suggests

* update e2etest app files to rhino-box styleguide

* address comments/suggestions in PR

* fixed version number issue. moved xml2 to imports
Base automatically changed from box_universal_linter to main February 5, 2024 08:07
Copy link
Member

@jakubnowicki jakubnowicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakubnowicki jakubnowicki merged commit a72120b into main Feb 7, 2024
20 checks passed
@jakubnowicki jakubnowicki deleted the feature/box_trailing_commas_linter branch February 7, 2024 15:29
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.

Box trailing commas linter
3 participants