Commit Graph

24 Commits

Author SHA1 Message Date
Peter Bigot 529a2e144e checkpatch: disable PREFER_SECTION
Zephyr doesn't use the __section macro, so stop warnings like this
from producing a compliance rejection.

WARNING:PREFER_SECTION: __section(.device_) is preferred over
   __attribute__((section(".device_")))
#702: FILE: include/device.h:743:
   __attribute__((__section__(".device_" #level STRINGIFY(prio))))

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-30 15:51:46 +01:00
Peter A. Bigot e32ecab7af checkpatch: disable REPEATED_WORD
A new check in Linux checks for repeated words, which spews false
positives from text like:

* @param param the parameter
* @param device device instance

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-21 13:57:02 -04:00
Christian Taedcke ac108de5d2 checkpatch: Enable check for C99 comments again
When checkpatch was updated, this behavour seems to have changed.
This change re-adds the check for C99 comments to prevent them.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-06-26 13:19:11 -04:00
Kumar Gala 93da8dc478 Revert "checkpatch: update checkpatch to warn about C99 type usage"
Now that we are standardizing C99 integer types we can revert the commit
that warned about C99 type usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Peter Bigot 786208656e checkpatch: suppress SPDX license line check
Zephyr has not committed to complying with the upstream requirement
that the SPDX declaration be on the first line of a file, so disable
the warning.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-04 09:06:31 -05:00
Arnaud Pouliquen 2669040f9d checkpatch: suppress mailback option in conf file
Suppress mailback conf to allow to use the -g parameter.
With the -g option it is possible to check coding style for multi
commits in the git tree without extracting them.
For instance the './scripts/checkpatch.pl --strict --git HEAD-4' command
checks the last 4 patches of the current branch.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-02-06 08:31:53 -05:00
Antony Pavlov f08148e640 scripts/checkpatch.pl: fix root dir detection and enable it
Don't try to find files specific for linux kernel.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-22 12:40:20 -04:00
Anas Nashif a8d259939b checkpatch: define typedefsfile to deal with a few false positives
checkpatch expects typedefs to be suffixed with _t and has different
rules when typedefs are being used as arguments of a function. This
seems to be a known issue and defining typedefs in a file resolves this
issue.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-09 10:43:05 -04:00
Kumar Gala a48e8790d3 checkpatch: update checkpatch to warn about C99 type usage
Only in rare cases should we allow C99 types, so lets warn about it to
catch issues.

Change-Id: I2bacdd4ba98f88482e0b7acc0567ff1139e749bf
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 17:24:04 +00:00
Jukka Rissanen a7e8bd6845 checkpatch: Remove reference to legacy IP stack
Old uIP based legacy IP stack is no longer there so it can
be removed from checkpatch conf file.

Change-Id: I2a17391f9cc8c0f8f8b81d520be1db8e2e8608f7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08 13:05:27 +00:00
Anas Nashif dd6f9ca9de checkpatch: ignore CONST_STRUCT warnings
Ignore for now and until we make this feature of checkpatch work with
zephyr in a more optimal way.

Change-Id: I9d08980994416a291f3143e3a22f8a2036ff2f8a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-11 22:12:22 +00:00
Anas Nashif d654c12f52 checkpatch: ignore file changes
Useless message at least for now that basically ends up
in every single gerrit change.

Change-Id: I56cea2b1b4e60d696c0ff9496d4464afca8c43ca
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-11 14:27:39 +00:00
Benjamin Walsh 7280377ae1 checkpatch: do not check for min_t/max_t
We do not provide these.

Change-Id: Ic2f7ba86a7a63753e6da623b6f1267405875375c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh f5c5f362a7 checkpatch: add --ignore DATE_TIME
Kernel makes use of __DATE__ and __TIME__ to get its build time.

Change-Id: I34b07a413cd79b2e9c34a2eae5803b9bb837e4ee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Javier B Perez 793cef5a86 checkpatch: add ignore for net/ip/contiki directory
Added rule to ignore net/ip/contiki content in the checkpatch style.

Change-Id: I06d8575d2a00d0032099c8a6d804fef3aaad8381
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-10 14:43:01 +00:00
Anas Nashif 627918822c checkpatch: decrease max line number to 80
Change-Id: I6bb83f877e10e5bd3f47eed264c8532081426bca
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-31 19:09:14 +00:00
Anas Nashif a98232af51 add MAINTAINERS file
Enable warning about updating the MAINTAINERS file when new
files are being added.

Change-Id: I3b13ca25cd01e3254fd4b9e169546a395ebfcacd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-26 15:19:28 +00:00
Anas Nashif f59708b1e5 checkpatch: exclude ext/ from checks
File and directories under ext/ are not original to Zephyr and have
different coding style.

Change-Id: Ie09eb324c35eb6e7be2cc3bcbc6ce6676376e346
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:05:42 +00:00
Javier B Perez 63bdf1c55b checkpatch: change default kconfig help length warns
Added default value for min-conf-desc-length = 1 for kconfig help.

Jira: ZEP-303
Change-Id: Ieab66a5cb76e2ab8dea4e80b056600173c333c01
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-05-11 20:23:51 +00:00
Szymon Janc 716626aa14 checkpatch: Remove --no-signoff option
All patches should have Signed-off-by line in commit message as
described in doc/collaboration/code/changes.rst.

Change-Id: Iba6bad47115fd5323a096fa58c2d0d8c5ec9db75
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:25:12 -05:00
Javier B Perez Hernandez 1b45249471 checkpatch: ignore NETWORKING_BLOCK_COMMENT_STYLE
Added flag to ignore NETWORKING_BLOCK_COMMENT_STYLE warnings

Change-Id: I022319366a9d956159d05bd5875215594a6f1aa6
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:24:36 -05:00
Anas Nashif e39cf08fbd checkpatch: ignore AVOID_EXTERNS
Change-Id: Ief5b4793119e35c15ba7005a47923bffcef12d9b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:32 -05:00
Anas Nashif 0066da7b65 checkpatch: ignore PREFER_KERNEL_TYPES
u16 and other types are linux specific

Change-Id: I5df86fb511343ac0db18fd9b919f37a5cada6ef1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:29 -05:00
Javier B Perez Hernandez 9020c57934 checkpatch: added config file
Created config file for checkpatch ".checkpatch.conf"

Change-Id: Ic2d72eed38b333d4b05d2d0c8953cbe2795d2429
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:23 -05:00