-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11263][SPARKR] lintr Throws Warnings on Commented Code in Documentation #9463
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
Conversation
|
Test build #45012 has finished for PR 9463 at commit
|
|
LGTM |
|
In my research, lintr have a bug of |
|
@yu-iskw yes, there are roughly a dozen "commented code" warnings left but they are mostly false positives, like the example you quoted. |
|
@felixcheung Thanks for taking a shot at this. Can we remove the |
|
Done. they won't do anything because of |
|
@yu-iskw btw, these are two other false positives that you might want to follow up with lintr: |
|
Test build #45092 has finished for PR 9463 at commit
|
1 similar comment
|
Sorry this slipped through. Will look at this tonight |
|
Could we push this, at least to master? that would really help dev running lintr for a much more manageable volume of warnings/errors |
R/pkg/R/DataFrame.R
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the @family from here ? Even though we have a noRd here it ends up generating the toRDD method as a link in the other DataFrame functions section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also need to remove the @rdname DataFrame here as it shows up in the DataFrame documentation page.
|
Sorry for the delay. I found one minor problem with |
|
thanks for catching that, I did some test I suspect they are caused by generics.R, so removing those. |
|
Test build #45801 has finished for PR 9463 at commit
|
|
Test build #45803 has finished for PR 9463 at commit
|
|
Thanks @felixcheung - Looks good now. Merging this. |
…mentation Clean out hundreds of `style: Commented code should be removed.` from lintr Like these: ``` /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:513:3: style: Commented code should be removed. # sc <- sparkR.init() ^~~~~~~~~~~~~~~~~~~ /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:514:3: style: Commented code should be removed. # sqlContext <- sparkRSQL.init(sc) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:515:3: style: Commented code should be removed. # path <- "path/to/file.json" ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` tried without export or rdname, neither work instead, added this `#' noRd` to suppress .Rd file generation also updated `family` for DataFrame functions for longer descriptive text instead of `dataframe_funcs`  this covers *most* of 'Commented code' but I left out a few that looks legitimate. Author: felixcheung <[email protected]> Closes #9463 from felixcheung/rlintr. (cherry picked from commit ed04846) Signed-off-by: Shivaram Venkataraman <[email protected]>
…mentation Clean out hundreds of `style: Commented code should be removed.` from lintr Like these: ``` /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:513:3: style: Commented code should be removed. # sc <- sparkR.init() ^~~~~~~~~~~~~~~~~~~ /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:514:3: style: Commented code should be removed. # sqlContext <- sparkRSQL.init(sc) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/spark-1.6.0-bin-hadoop2.6/R/pkg/R/DataFrame.R:515:3: style: Commented code should be removed. # path <- "path/to/file.json" ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` tried without export or rdname, neither work instead, added this `#' noRd` to suppress .Rd file generation also updated `family` for DataFrame functions for longer descriptive text instead of `dataframe_funcs`  this covers *most* of 'Commented code' but I left out a few that looks legitimate. Author: felixcheung <[email protected]> Closes apache#9463 from felixcheung/rlintr.
Clean out hundreds of
style: Commented code should be removed.from lintrLike these:
tried without @export or @Rdname, neither work
instead, added this
#' @noRdto suppress .Rd file generationalso updated

@familyfor DataFrame functions for longer descriptive text instead ofdataframe_funcsthis covers most of 'Commented code' but I left out a few that looks legitimate.