• Ian Spray's avatar
    Allow style checking of tree and local changes · 36eaaf37
    Ian Spray authored
    New phony Makefile targets have been added:
    
     * checkcodebase
     * checkpatch
    
    The checkcodebase target will run a Linux style compliance check over the
    entire codebase, and honours the V=1 Makefile verbose setting and so will
    show more information when this is enabled.
    
    If the local directory is a git checkout then the output of git ls-files is
    used to decide which files to test for compliance.  If the local directory
    is not under git control then a 'best attempt' is made, but in this case it
    should be noted that it is possible for additional non-codebase files to be
    tested, so care should be taken when parsing the output.
    
    The checkpatch target will compare local changes against the git origin/master
    to allow issues with the last set of changes to be identified.  To override
    the change comparision location, set the BASE_COMMIT variable to your
    desired git branch.
    
    Both targets rely on the Linux source tree script checkpatch.pl to do the
    syntax checking, and expects that the CHECKPATCH environment variable points
    to the location of this file.
    
    Notes on the usage of these targets have been added to the contributing.md
    and docs/user-guide.md text files.
    
    Change-Id: I6d73c97af578e24a34226d972afadab9d30f1d8d
    36eaaf37
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.
contributing.md 5.98 KB