r-lib / styler

Non-invasive pretty printing of R code
https://styler.r-lib.org
Other
724 stars 71 forks source link

Turn off `strings_as_factors_linter()` #1217

Closed IndrajeetPatil closed 3 months ago

IndrajeetPatil commented 3 months ago

Since we rely on >= R 4.0 now.

github-actions[bot] commented 3 months ago

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 434cbc5798680f127fbb191e6e91f046617a57bc is merged into main:

Further explanation regarding interpretation and methodology can be found in the documentation.

MichaelChirico commented 3 months ago

Confirming this is everything re-using the ad hoc linter in https://github.com/r-lib/lintr/pull/2605:

l <- make_linter_from_xpath(lint_message = "", "
  //SYMBOL_SUB[text() = 'stringsAsFactors']
    /parent::expr[not(
      expr/SYMBOL_FUNCTION_CALL[text() = 'expand.grid']
      or ./expr/expr/SYMBOL_FUNCTION_CALL[text() = 'table']
    )]
  ")
lint_package(linters = l())