Open-Network-Models-and-Interfaces-ONMI / onmi-iisomi-xhaul-uml-yang

5G xHaul PoC Applications
Apache License 2.0
30 stars 39 forks source link

WIP: Add .coafile & .travis.yml to lint **.yang & **.js #12

Closed userzimmermann closed 7 years ago

userzimmermann commented 7 years ago

To start with Continuous Integration testing I activated Travis for this repository:

https://travis-ci.org/OpenNetworkingFoundation/CENTENNIAL

And as a first testing step I added coala.io based static code analysis of all *.yang files under models/ and its sub-directories.

coala doesn't support YANG linting yet. So I created a pull request for a YANGBear:

https://github.com/coala/coala-bears/pull/1428

And the Travis test script installs coala-bears directly from my related branch. So until it gets merged and included in the next coala-bears release, this CENTENNIAL pull request should stay WIP (Work In Progress).

I also activated required reviews and CI passing checks for pull requests to the master branch, so that the master branch stays clean and stable, as long as we follow a pull request based development process :)

userzimmermann commented 7 years ago

@demx8as6 As you can see on Travis...

https://travis-ci.org/OpenNetworkingFoundation/CENTENNIAL/builds/202620831

... there are many JavaScript linting issues. Do we want to solve them before merging this PR? I would do so...

Whereby I think it would be best to disable the no-redeclare option of eslint for now... I will just do this.

userzimmermann commented 7 years ago

@demx8as6 Looks much friendlier now without no-redeclare linting rule ;)

https://travis-ci.org/OpenNetworkingFoundation/CENTENNIAL/builds/202624653

demx8as6 commented 7 years ago

I would love to merge this pull request. However this here is just a modified fork - such pull request should also apply for https://github.com/OpenNetworkingFoundation/EAGLE-Open-Model-Profile-and-Tools/tree/ToolChain

demx8as6 commented 7 years ago

Currently checks are only optional. This is needed in order to generate and push yang modules on short term. The target clearly is that the checks are mandatory - check github/settings/branches/protected-branches.