Recently I spent some time on Travis CI, the below is the progress: 1. Added Android Lint check and OCLint check in Travis CI.
- [Android Lint] If the files in the android folder are modified, new-created, or deleted, the AndroidLint check will be triggered. Once any rules of AndroidLint are triggered, Travis CI will build failed and the result of AndroidLint will be displayed at the PR. (We have solved all the problems reported by AndroidLint) - [OCLint] If the C++ or Objective-C files are modified, new-created, or deleted, the OCLint check will be triggered. OCLint is the same as Android Lint, Once any rules of OCLint are triggered, Travis CI will build failed and the result of OCLint will be displayed at the PR. (We are solving all the problems reported by OCLint and will complete soon.) But there are too many rules of OCLint and many of them have a little effect on our project. So we disable some of the rules, as the is shown. 2. Add Check of the iOS project. Only ios-sdk project build successful and all the test cases of the ios-playground pass, the check will succeed. otherwise, The Travis CI will build failed. 3. Add code-format validation check. use Clang-Format to validate the code format, as Clang-Format supports code format of the llvm languages, such as c++, objective-c, java, etc. I found a danger plugin named danger-code_style_validation <https://github.com/flix-tech/danger-code_style_validation> almost satisfied our needs. it uses 'clang-format' to look for code style violations in added lines on the current PR and offers inline patches. To meet our needs, I fork that repo and I did some change based on it : 1. change message level from error to warn(because I think the code format is recommended and not necessary.) 2. modify the message hint and make it more readable. In Travis CI, the Weex project will download this plugin through a GitHub link and use it to validate code-format. here is the configuration <https://github.com/apache/incubator-weex/blob/79494d2027760d9d6ba6d8ae807c6e155896df08/Gemfile#L11> . but I am not sure whether this behavior meets the requirements of AFS, If not, what should I do? Links: OCLint diable rule: https://github.com/apache/incubator-weex/blob/79494d2027760d9d6ba6d8ae807c6e155896df08/.travis.yml#L167
