Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 1 | # |
Yann Gautier | d495739 | 2019-03-06 10:58:13 +0100 | [diff] [blame] | 2 | # Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 3 | # |
Antonio Nino Diaz | 371a967 | 2018-12-19 13:13:33 +0000 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | # |
| 8 | # Configure how the Linux checkpatch script should be invoked in the context of |
| 9 | # the Trusted Firmware source tree. |
| 10 | # |
| 11 | |
| 12 | # This is not Linux so don't expect a Linux tree! |
| 13 | --no-tree |
| 14 | |
Antonio Nino Diaz | 4237fb6 | 2018-04-27 09:29:20 +0100 | [diff] [blame] | 15 | # The Linux kernel expects the SPDX license tag in the first line of each file. |
| 16 | # We don't follow this in the Trusted Firmware. |
| 17 | --ignore SPDX_LICENSE_TAG |
| 18 | |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 19 | # This clarifes the lines indications in the report. |
| 20 | # |
| 21 | # E.g.: |
| 22 | # Without this option, we have the following output: |
| 23 | # #333: FILE: drivers/arm/gic/arm_gic.c:160: |
| 24 | # So we have 2 lines indications (333 and 160), which is confusing. |
| 25 | # We only care about the position in the source file. |
| 26 | # |
| 27 | # With this option, it becomes: |
| 28 | # drivers/arm/gic/arm_gic.c:160: |
| 29 | --showfile |
| 30 | |
Antonio Nino Diaz | 2cd4b58 | 2018-01-29 12:00:31 +0000 | [diff] [blame] | 31 | # Don't show some messages like the list of ignored types or the suggestion to |
| 32 | # use "--fix" or report changes to the maintainers. |
| 33 | --quiet |
| 34 | |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 35 | # |
| 36 | # Ignore the following message types, as they don't necessarily make sense in |
| 37 | # the context of the Trusted Firmware. |
| 38 | # |
| 39 | |
| 40 | # COMPLEX_MACRO generates false positives. |
| 41 | --ignore COMPLEX_MACRO |
| 42 | |
| 43 | # Commit messages might contain a Gerrit Change-Id. |
| 44 | --ignore GERRIT_CHANGE_ID |
| 45 | |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 46 | # FILE_PATH_CHANGES reports this kind of message: |
| 47 | # "added, moved or deleted file(s), does MAINTAINERS need updating?" |
| 48 | # We do not use this MAINTAINERS file process in TF. |
| 49 | --ignore FILE_PATH_CHANGES |
| 50 | |
| 51 | # AVOID_EXTERNS reports this kind of messages: |
| 52 | # "externs should be avoided in .c files" |
| 53 | # We don't follow this convention in TF. |
| 54 | --ignore AVOID_EXTERNS |
| 55 | |
| 56 | # NEW_TYPEDEFS reports this kind of messages: |
| 57 | # "do not add new typedefs" |
| 58 | # We allow adding new typedefs in TF. |
| 59 | --ignore NEW_TYPEDEFS |
| 60 | |
Antonio Nino Diaz | 2cd4b58 | 2018-01-29 12:00:31 +0000 | [diff] [blame] | 61 | # Avoid "Does not appear to be a unified-diff format patch" message |
| 62 | --ignore NOT_UNIFIED_DIFF |
| 63 | |
Sandrine Bailleux | 0b5a158 | 2016-06-02 11:19:59 +0100 | [diff] [blame] | 64 | # VOLATILE reports this kind of messages: |
| 65 | # "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt" |
| 66 | # We allow the usage of the volatile keyword in TF. |
| 67 | --ignore VOLATILE |
Yann Gautier | d495739 | 2019-03-06 10:58:13 +0100 | [diff] [blame] | 68 | |
| 69 | # BRACES reports this kind of messages: |
| 70 | # braces {} are not necessary for any arm of this statement |
| 71 | --ignore BRACES |
Yann Gautier | 6ba648d | 2019-03-08 15:44:59 +0100 | [diff] [blame] | 72 | |
| 73 | # PREFER_KERNEL_TYPES reports this kind of messages (when using --strict): |
| 74 | # "Prefer kernel type 'u32' over 'uint32_t'" |
| 75 | --ignore PREFER_KERNEL_TYPES |
| 76 | |
| 77 | # USLEEP_RANGE reports this kind of messages (when using --strict): |
| 78 | # "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt" |
| 79 | --ignore USLEEP_RANGE |
| 80 | |
| 81 | # COMPARISON_TO_NULL reports this kind of messages (when using --strict): |
| 82 | # Comparison to NULL could be written "" |
| 83 | --ignore COMPARISON_TO_NULL |
| 84 | |
| 85 | # UNNECESSARY_PARENTHESES reports this kind of messages (when using --strict): |
| 86 | # Unnecessary parentheses around "" |
| 87 | --ignore UNNECESSARY_PARENTHESES |