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

incorrectly tagged lint "Use FALSE instead of the symbol F" #657

Closed
IndrajeetPatil opened this issue Dec 4, 2020 · 2 comments · Fixed by #759
Closed

incorrectly tagged lint "Use FALSE instead of the symbol F" #657

IndrajeetPatil opened this issue Dec 4, 2020 · 2 comments · Fixed by #759
Labels
bug an unexpected problem or unintended behavior
Milestone

Comments

@IndrajeetPatil
Copy link
Collaborator

Since a couple of days, I have started to get a new lint in my CI checks (IndrajeetPatil/statsExpressions@cc00f65#commitcomment-44804914).

But I think this is unintentional, since here F refers to F-statistic

R/helpers_anova.R:134:34: style: Use FALSE instead of the symbol F.statistic = ez_df$ANOVA$F[2],

                                ~^
@AshesITR
Copy link
Collaborator

AshesITR commented Dec 4, 2020

Thanks for reporting.
In the mean time, you can use

ez_df$ANOVA[["F"]][2] to work around the issue.

@russHyde russHyde added the bug an unexpected problem or unintended behavior label Dec 9, 2020
@MichaelChirico MichaelChirico added this to the 3.0.0 milestone Jan 31, 2021
@AshesITR
Copy link
Collaborator

This should only concern dollar-expressions (where SYMBOLs aren't evaluated), argument names, assignments and NSE (which would be difficult to support IINM)

No T_and_F lints should fire for

x <- list(
  T = 42L,
  F = 21L
)

x$F <- 42L

T <- "foo"

MichaelChirico pushed a commit that referenced this issue Feb 18, 2021
* Use XPath for T_and_F_symbol_linter and fix false positives

fixes #657

* fix exclusion test

* make sure range starts at original col1

* update linting behaviour for assignments

* refactor XPaths

* fix merge failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants