diff options
author | davidcunado-arm <david.cunado@arm.com> | 2018-02-01 18:15:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 18:15:53 +0000 |
commit | 693e278e308441d716f7f5116c43aa150955da31 (patch) | |
tree | b8e5eab7542467ad1330d7ef3d76bb01f4a18014 | |
parent | 9bc94a6d76fb61be9e2d223520d7f03aa6482e2e (diff) | |
parent | 51d28937502445e73dc1db5d0863946435e9e630 (diff) |
Merge pull request #1245 from antonio-nino-diaz-arm/an/checkpatch
Analyze coding style of patches individually
-rw-r--r-- | .checkpatch.conf | 9 | ||||
-rw-r--r-- | Makefile | 11 |
2 files changed, 17 insertions, 3 deletions
diff --git a/.checkpatch.conf b/.checkpatch.conf index 0c84fcd0..e92b96f3 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -48,6 +48,10 @@ # drivers/arm/gic/arm_gic.c:160: --showfile +# Don't show some messages like the list of ignored types or the suggestion to +# use "--fix" or report changes to the maintainers. +--quiet + # # Ignore the following message types, as they don't necessarily make sense in # the context of the Trusted Firmware. @@ -78,6 +82,9 @@ # We allow adding new typedefs in TF. --ignore NEW_TYPEDEFS +# Avoid "Does not appear to be a unified-diff format patch" message +--ignore NOT_UNIFIED_DIFF + # VOLATILE reports this kind of messages: # "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt" # We allow the usage of the volatile keyword in TF. @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -680,7 +680,14 @@ checkcodebase: locate-checkpatch checkpatch: locate-checkpatch @echo " CHECKING STYLE" - ${Q}git format-patch --stdout ${BASE_COMMIT}..HEAD -- ${CHECK_PATHS} | ${CHECKPATCH} - || true + ${Q}COMMON_COMMIT=$$(git merge-base HEAD ${BASE_COMMIT}); \ + for commit in `git rev-list $$COMMON_COMMIT..HEAD`; do \ + printf "\n[*] Checking style of '$$commit'\n\n"; \ + git log --format=email "$$commit~..$$commit" \ + -- ${CHECK_PATHS} | ${CHECKPATCH} - || true; \ + git diff --format=email "$$commit~..$$commit" \ + -- ${CHECK_PATHS} | ${CHECKPATCH} - || true; \ + done certtool: ${CRTTOOL} |