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

Fixes #1851 Executed styler against package source #1862

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

AmundsenJunior
Copy link
Contributor

@AmundsenJunior AmundsenJunior commented Sep 6, 2018

Fixes #1851

  • Executed styler against package source
    • corrected whitespace
    • added opening and closing brackets
    • moved closing parens
    • corrected indentation
    • function params on multiple lines
    • replaced "=" with "<-"
    • replaced single- with double-quotes
  • Added 'styler' to package 'Suggests'

Might be a good note to package contributors to also run styler in the future, but not sure where (README, or elsewhere) to put this information:

install.packages("styler")
styler::style_pkg()

#usethis::use_data(..., internal = internal, overwrite = overwrite,
#compress = compress)
#}
# function(..., pkg = ".", internal = FALSE, overwrite = FALSE,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

styler removed all function indentation as extra whitespaces, so I added it back. It will get removed each time styler is run against this file, though.

R/install.r Outdated
if (is_loaded(pkg)) {
eapply(pkgload::ns_env(pkg$package), force, all.names = TRUE)
}
args = getOption("devtools.install.args"), quiet = FALSE,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole file is not noticeably changed much by styler. The side-by-side compare is mixed-up for reasons I can't discern.

@AmundsenJunior
Copy link
Contributor Author

I ran devtools::document() to generate a new check.Rd for the latest change to that file, as it was the only error in TravisCI. Doing so only revealed other errors in the build. Should I remove the check.Rd change and/or wait to address this PR once the test failures are resolved?

@jimhester
Copy link
Member

Looks good to me, thanks! Could you add a note to NEWS.md documenting the change and mentioning the issue # and your GitHub name.

Don't worry about the travis errors, I will fix them after merging.

@jimhester
Copy link
Member

Also if you want GitHub to map your commits to your GitHub user you will need to add the email you used in the commits to https://github.com/settings/emails

@AmundsenJunior AmundsenJunior force-pushed the styler branch 2 times, most recently from 4eb653b to b2fdabb Compare September 7, 2018 15:48
@AmundsenJunior
Copy link
Contributor Author

@jimhester Updated NEWS.md and the email address. Thanks.

DESCRIPTION Outdated
@@ -57,6 +57,7 @@ Suggests:
rversions,
sessioninfo,
spelling (>= 1.1),
styler,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should probably leave styler out of Suggests. While it is nice to have it as a hint for contributors it has a non-trivial number of dependencies which would need to be installed on the CI systems for each build. So if we aren't actually going to use it there I think it would be better to omit it.

Copy link
Contributor Author

@AmundsenJunior AmundsenJunior Sep 10, 2018

Choose a reason for hiding this comment

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

Will do. Done.

Fixes r-lib#1851
Updated documentation for check.R change
Updated NEWS.md with styler change
@jimhester jimhester merged commit f17f8b7 into r-lib:master Sep 11, 2018
@jimhester
Copy link
Member

jimhester commented Sep 11, 2018

Thanks again!

@AmundsenJunior AmundsenJunior deleted the styler branch September 11, 2018 18:30
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