summaryrefslogtreecommitdiff
path: root/tools/patman/checkpatch.py
Commit message (Collapse)AuthorAgeLines
* patman: Fix up checkpatch parsing to deal with 'CHECK' linesSimon Glass2013-04-04-42/+68
| | | | | | | | | | | | | | | checkpatch has a new type of warning, a 'CHECK'. At present patman fails with these, which makes it less than useful. Add support for checks, making it backwards compatible with the old checkpatch. At the same time, clean up formatting of the CheckPatches() output, fix erroneous "internal error" if multiple patches have warnings and be more robust to new types of problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org>
* patman: Allow use outside of u-boot treeVadim Bendebury2013-01-31-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | To make it usable in git trees not providing a patch checker implementation, add a command line option, allowing to suppress patch check. While we are at it, sort debug options alphabetically. Also, do not raise an exception if checkpatch.pl is not found - just print an error message suggesting to use the new option, and return nonzero status. . unit test passes: $ ./patman -t <unittest.result.TestResult run=7 errors=0 failures=0> . successfully used patman in the autotest tree to generate a patch email (with --no-check option) . successfully used patman in the u-boot tree to generate a patch email . `patman --help' now shows command line options ordered alphabetically Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Acked-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Look for checkpatch in the scripts directoryDoug Anderson2013-01-31-1/+3
| | | | | | | | | The Linux kernel stores checkpatch.pl in the scripts directory. Add that to the search path to make things more automatic for kernel development. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Handle checkpatch.pl not providing file/line infoSimon Glass2012-10-15-2/+3
| | | | | | | | Sometimes we don't get a valid filename or line number from checkpatch.pl, for example if the patch is in a bad format. Deal with this by using a default value, rather than a stack trace. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add 'patman' patch generation, checking and submission scriptSimon Glass2012-04-21-0/+161
What is this? ============= This tool is a Python script which: - Creates patch directly from your branch - Cleans them up by removing unwanted tags - Inserts a cover letter with change lists - Runs the patches through checkpatch.pl and its own checks - Optionally emails them out to selected people It is intended to automate patch creation and make it a less error-prone process. It is useful for U-Boot and Linux work so far, since it uses the checkpatch.pl script. It is configured almost entirely by tags it finds in your commits. This means that you can work on a number of different branches at once, and keep the settings with each branch rather than having to git format-patch, git send-email, etc. with the correct parameters each time. So for example if you put: in one of your commits, the series will be sent there. See the README file for full details. END Signed-off-by: Simon Glass <sjg@chromium.org>