Skip to content

Conversation

@AshesITR
Copy link
Collaborator

@AshesITR AshesITR commented Jun 5, 2022

fixes #1357

Didn't touch checkstyle_output().

CC @renkun-ken Not sure if this is relevant to the vscode linter support.

R/actions.R Outdated
"file=%s,line=%s,col=%s", x$filename, x$line_number, x$column_number
)
cat(sprintf(
"::warning %s::%s,%s\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not adjust the template instead?

expect_equal(marker1$markers[[1L]]$line, lint1[[1L]]$line_number)
expect_equal(marker1$markers[[1L]]$column, lint1[[1L]]$column_number)
expect_equal(marker1$markers[[1L]]$message, lint1[[1L]]$message)
expect_equal(marker1$markers[[1L]]$message, paste0("[", lint1[[1L]]$linter, "] ", lint1[[1L]]$message))
Copy link
Collaborator

Choose a reason for hiding this comment

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

we really need some better test helpers... really hard to tell what the impact of the change is exactly.

something like expect_lint_output(x, "...", rstudio = TRUE), where we do some trim_some()-like logic on "..." to maximize readability would make it super clear to the test reader and super easy for the test writer.

(for another day...)

@MichaelChirico
Copy link
Collaborator

would you mind attaching a screenshot of the new output if you get a chance? i haven't had a chance to pull & install to check myself

@AshesITR AshesITR force-pushed the feature/1357-linter-name branch from 97faec4 to 49c5dca Compare June 5, 2022 21:44
@AshesITR
Copy link
Collaborator Author

AshesITR commented Jun 5, 2022

I don't use RStudio, but here is the console output:

image

@MichaelChirico
Copy link
Collaborator

Code changes LGTM, but I've a terrible eye for design-y stuff. Let's get a third pair of eyes on it... @renkun-ken or @jameslamb care to weigh in?

@jameslamb
Copy link

care to weigh in?

I'm not familiar enough with the internals of {lintr} to comment on specific code changes, but happy to say that #1363 (comment) looks like exactly what I was envisioning. As long as I can rely on putting whatever is in [] into a # nolint: comment to suppress that specific warning, looks great to me!

@MichaelChirico
Copy link
Collaborator

no need to know internals, only asking about the end-user appearance part.

and good enough for me!

@MichaelChirico MichaelChirico merged commit cc9a221 into main Jun 5, 2022
@MichaelChirico MichaelChirico deleted the feature/1357-linter-name branch June 5, 2022 22:45
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.

Feature request: include linter name in warnings

4 participants