Run code formatting checks on travis #163

Merged
kaykurokawa merged 2 commits from rep_build into master 2018-06-28 04:09:36 +02:00
kaykurokawa commented 2018-06-20 23:55:57 +02:00 (Migrated from github.com)

Added an option on reproducible_build.sh to run a code formatting check on any commits not on master (by default this option is off). Travis will use this option and build will fail if it finds any lines that needs to be formatted.

For https://github.com/lbryio/lbrycrd/issues/157

Added an option on reproducible_build.sh to run a code formatting check on any commits not on master (by default this option is off). Travis will use this option and build will fail if it finds any lines that needs to be formatted. For https://github.com/lbryio/lbrycrd/issues/157
lyoshenka commented 2018-06-25 16:54:00 +02:00 (Migrated from github.com)

👍 this is the only way to enforce code styles, imho

:+1: this is the only way to enforce code styles, imho
kaykurokawa commented 2018-06-27 18:15:24 +02:00 (Migrated from github.com)

Brought in the latest .clang-format and developer docs from Bitcoin Core. We should follow these from now on.

reproducible_build.sh has a new option flag -f that will run a code formatting check on any commit not on master using .clang-format before building. On travis, the build will fail if there are any code formatting issues on your commits.

If you want to run just the code formatting check script, I added a line in README on how to do that.

Added some comments on README about dealing with changes that we bring in from Bitcoin Core that is not expected to be used when we do a full merge from upstream (i.e. updating to the lastet Core version). Note that e9369eb is one of those commits.

Brought in the latest .clang-format and developer docs from Bitcoin Core. We should follow these from now on. reproducible_build.sh has a new option flag -f that will run a code formatting check on any commit not on master using .clang-format before building. On travis, the build will fail if there are any code formatting issues on your commits. If you want to run just the code formatting check script, I added a line in README on how to do that. Added some comments on README about dealing with changes that we bring in from Bitcoin Core that is not expected to be used when we do a full merge from upstream (i.e. updating to the lastet Core version). Note that e9369eb is one of those commits.
lbrynaut (Migrated from github.com) reviewed 2018-06-27 19:07:24 +02:00
lbrynaut (Migrated from github.com) commented 2018-06-27 19:07:24 +02:00

I don't think this will do what you expect it to do.

Try:

git remote add origin2 https://github.com/lbryio/lbrycrd.git
git fetch origin2
git diff -U0 origin2/master -- ... snip ...
I don't think this will do what you expect it to do. Try: ``` git remote add origin2 https://github.com/lbryio/lbrycrd.git git fetch origin2 git diff -U0 origin2/master -- ... snip ... ```
lbrynaut commented 2018-06-27 20:21:42 +02:00 (Migrated from github.com)

@kaykurokawa This looks good to me (although what happens if the style fails -- just a travis failure?). If you want to merge and create the release including the OS X build, maybe this is a good spot to do it.

@kaykurokawa This looks good to me (although what happens if the style fails -- just a travis failure?). If you want to merge and create the release including the OS X build, maybe this is a good spot to do it.
kaykurokawa commented 2018-06-28 01:27:06 +02:00 (Migrated from github.com)

Yes if the style fails for the commits, travis will refuse to build

Yes if the style fails for the commits, travis will refuse to build
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#163
No description provided.