-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add lintr config #167
Merged
Merged
Add lintr config #167
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
God damnit. Guess now I have to fix all the broken exports/importsfrom 😞 |
That's much better. The remaining warnings are actual warnings we could/should work on. Either by adding Currently the following is reported: Warning: local variable ‘n’ assigned but may not be used
Warning messages:
1: In readLines(filename) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-loading_workbook.R'
2: In readLines(filename) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-named_regions.R'
3: In readLines(file) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-named_regions.R'
4: In readLines(filename) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-outlines.R'
5: In readLines(filename) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-saveWorkbook.R'
6: In readLines(filename) :
incomplete final line found on '/Users/runner/work/openxlsx/openxlsx/tests/testthat/test-write_xlsx_vector_args.R'
Warning: local variable ‘count’ assigned but may not be used
Warning: local variable ‘sheetWithPivot’ assigned but may not be used
Warning: no visible global function definition for ‘shell’
Warning: local variable ‘nvars’ assigned but may not be used
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: local variable ‘dateIds’ assigned but may not be used
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid length(...):1 expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid length(...):1 expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: local variable ‘bgFillList’ assigned but may not be used
Warning: local variable ‘fgFillList’ assigned but may not be used
Warning: local variable ‘xml’ assigned but may not be used
Warning: local variable ‘sheet’ assigned but may not be used
Warning: local variable ‘sheet’ assigned but may not be used
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:ncol(...) expressions, use seq_len.
Warning: Avoid 1:ncol(...) expressions, use seq_len.
Warning: Avoid 1:nrow(...) expressions, use seq_len.
Warning: Avoid 1:nrow(...) expressions, use seq_len.
Warning: Avoid 1:ncol(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len.
Warning: Avoid 1:length(...) expressions, use seq_len. |
I cleaned up the code with PR #168 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently there are hundreds of notifications that
lintr
throws. There are many cases wherelintr
follows thetidyverse
style by default, while we use a somewhat wild mix of whatever the authors liked. Fixing many of these style-related clues is a tedious task (that no one is going to tackle anytime soon, and - on a personal note - some of the default style ideas are at least debatable), but currently there is no longer any benefit from static code analysis if the output is buried in a bunch of stuff that no one cares about. So I disabled all the non-critical linters to just show the warnings for now.Some of the other stuff should be fixed as well, but until someone has the time to fix those, I think it's best to just not output them at all.