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

fix delint conflicts #687

Merged
merged 21 commits into from
Dec 6, 2020
Merged

fix delint conflicts #687

merged 21 commits into from
Dec 6, 2020

Conversation

AshesITR
Copy link
Collaborator

@AshesITR AshesITR commented Dec 6, 2020

Unfortunately, some newly enabled linters had hits in tests, so we aren't lint-free on master atm.

@@ -1,6 +1,6 @@
linters: with_defaults( # The following TODOs are part of an effort to have {lintr} lint-free (#584)
line_length_linter = line_length_linter(120),
cyclocomp_linter = cyclocomp_linter(29), # TODO reduce to 15
cyclocomp_linter = cyclocomp_linter(30), # TODO reduce to 15
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#673 added 1 to the cyclocomp of lint().
To keep this separate from removing ~ 200 lints from tests/, I temporarily bump the limit here.

@AshesITR AshesITR changed the title [WIP] fix delint conflicts fix delint conflicts Dec 6, 2020
MichaelChirico
MichaelChirico previously approved these changes Dec 6, 2020
@@ -60,11 +60,6 @@ test_that("returns the correct linting", {
expected_message <- tryCatch(parse(text = "\\"), error = get_base_message)
expect_lint("\\", rex(expected_message))

# also try when LANGUAGE initially unset
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This causes non-english locales to fail the test.

test-exclusions.R was not touched since it contains 3 calls (and will be split by #660)
@AshesITR AshesITR mentioned this pull request Dec 6, 2020
@AshesITR
Copy link
Collaborator Author

AshesITR commented Dec 6, 2020

@MichaelChirico can you re-approve? I had a merge conflict and test failure on non-english locale due to Sys.unsetenv() in test-error.R.

@MichaelChirico MichaelChirico merged commit abf92a4 into master Dec 6, 2020
@MichaelChirico MichaelChirico deleted the delint/fix-delint-conflicts branch December 6, 2020 18:06
@MichaelChirico
Copy link
Collaborator

That Sys.unsetenv was for coverage -- do we know what's the issue exactly?

@AshesITR
Copy link
Collaborator Author

AshesITR commented Dec 6, 2020

Ah, the problem was that expect_lint automatically sets LANGUAGE = en so the expected error message is actually language-independent.

in hindsight, removing the update of expected_message should have done the job.

@MichaelChirico
Copy link
Collaborator

OK, we'll add that back in the future

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.

2 participants