Add code formatting check to Travis CI build #54
Merged
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.
Check compliance with the Artistic Style code formatter configuration found in https://github.com/arduino/Arduino/blob/master/build/shared/examples_formatter.conf. A consistent style will be used for example sketches as well as library code.
This required first doing an auto format of all the code in the repository.
A TravisBuddy webhook was added to the Travis CI build. TravisBuddy will automatically comment on any pull request that results in a failing Travis CI build so that the author of the PR will get a notification of the issue and hopefully resolve it.
Example of a build failure caused by non-compliant code formatting:
https://travis-ci.org/per1234/ArduinoIoTCloud/jobs/517209067
Example of TravisBuddy automated comment on a demonstration pull request that failed the code formatting check:

https://github.com/per1234/ArduinoIoTCloud/pull/1
Related: