On 8 February 2017 at 16:50, Maxim Uvarov <maxim.uva...@linaro.org> wrote:

> run checkpatch.pl to check code style for applied patches.
> Do not check spelling now. Will check it only on merge requests.
>
> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
>

Reviewed-by: Mike Holmes <mike.hol...@linaro.org>


> ---
>  v2: travis generates buggy $TRAVIS_COMMIT_RANGE env variable on git push.
>      That is situation when commit exist on remote git but is not
> accessible
>      with git clone. That is known issues and force push very rare case.
> Check
>      only the latest commit in case of force push. On merge request and
> fast forward
>      pushes validate all patches.
>
>  .travis.yml | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/.travis.yml b/.travis.yml
> index 5b9a29a6..9544ec8f 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -95,6 +95,21 @@ before_install:
>          - popd
>
>  script:
> +        - echo $TRAVIS_COMMIT_RANGE
> +        - ODP_PACHES=`echo $TRAVIS_COMMIT_RANGE | sed 's/\.//'`
> +#        Generate patches provided with $TRAVIS_COMMIT_RANGE.
> +#        In case of force push and range is broken validate only the
> latest commit if it's not merge commit.
> +        - git format-patch $ODP_PACHES;
> +          if [ $? -ne 0 ]; then
> +            git show --summary HEAD| grep -q '^Merge:';
> +            if [ $? -ne 0 ]; then
> +              git format-patch HEAD^;
> +              perl ./scripts/checkpatch.pl *.patch;
> +            fi;
> +          else
> +            perl ./scripts/checkpatch.pl *.patch;
> +          fi
> +
>          - ./bootstrap
>          - ./configure
>          - make doxygen-doc
> --
> 2.11.0.295.gd7dffce
>
>


-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"

Reply via email to