Skip to content

[R-package] cleaned up formatting in R C/C++ files#2844

Merged
jameslamb merged 4 commits intolightgbm-org:masterfrom
jameslamb:misc/r-api-formatting
Mar 10, 2020
Merged

[R-package] cleaned up formatting in R C/C++ files#2844
jameslamb merged 4 commits intolightgbm-org:masterfrom
jameslamb:misc/r-api-formatting

Conversation

@jameslamb
Copy link
Copy Markdown
Member

This is a style-only PR. As I've been working on #629 , I see a few opportunities to make the current R-specific parts of lib_lightgbm a bit easier to read and edit. The diff looks a bit weird here on GitHub, but to be clear I did not change any of what the code in these files does. In this PR, I'm just proposing some indentation changes, for example taking definitions like this:

LIGHTGBM_C_EXPORT LGBM_SE LGBM_DatasetCreateFromFile_R(LGBM_SE filename,
  LGBM_SE parameters,
  LGBM_SE reference,
  LGBM_SE out,
  LGBM_SE call_state);

and turning them into this

LIGHTGBM_C_EXPORT LGBM_SE LGBM_DatasetCreateFromFile_R(
  LGBM_SE filename,
  LGBM_SE parameters,
  LGBM_SE reference,
  LGBM_SE out,
  LGBM_SE call_state
);

I also changed the language in the comment at the top of R_object_helper.h to better reflect the current state of the R package.

@jameslamb
Copy link
Copy Markdown
Member Author

@guolinke @Laurae2 what do you think? Since I'm touching a lot of code for the R package, I don't want to merge without one of you approving.

Laurae2
Laurae2 previously requested changes Mar 7, 2020
@jameslamb jameslamb force-pushed the misc/r-api-formatting branch from 5891bbf to f2c0f8f Compare March 10, 2020 01:53
@jameslamb jameslamb requested a review from Laurae2 March 10, 2020 01:53
@jameslamb
Copy link
Copy Markdown
Member Author

Thanks for the reviews!

@jameslamb jameslamb dismissed Laurae2’s stale review March 10, 2020 04:42

Made the requested minor change in f2c0f8f

@jameslamb jameslamb merged commit 643dd7b into lightgbm-org:master Mar 10, 2020
@jameslamb jameslamb deleted the misc/r-api-formatting branch March 25, 2020 20:02
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants