Commit graph

12 commits

Author SHA1 Message Date
Christian Hopps bec10915a4 tools: checkpatch updated with darr_foreach iter macros
Also update `checkpatch.sh` so it runs `checkpatch.pl` from the same directory
it resides in. This allows copying them both somewhere else to use a specific
version.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-06 17:44:58 -05:00
Quentin Young 540b2efdf7 tools: improve checkpatch slicing
checkpatch cuts from the diff between the outputs of pre-patch and
post-patch runs of `checkpatch.pl`, but fixed-length greps sometimes
don't cut correctly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-03 17:25:14 +00:00
Lou Berger 7a7a480dfe tools: checkpatch.sh - use run specific /tmp directories, remove them when done
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-14 09:43:16 -04:00
Quentin Young 6b1ebf3c3c
Merge branch 'master' into stylechecker 2018-02-23 11:23:29 -05:00
Quentin Young 2580e72f8d
tools: finer-grained error codes for checkpatch
* 2 for errors
* 1 for warnings
* 0 for clean
* Suppress all report text for a clean result
* Remove check for const structs from perl script
* Remove grep suppression for that check from shell script

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-02-23 11:02:19 -05:00
Philippe Guibert 513e922309 tools: fix that filters issues on resulting file only
Because checkpatch result is applied to original and new file, the
analysis also parses what may be wrong with the original file.
Whereas the script should limit to analyse only what is wrong on new
file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-02-23 16:16:30 +01:00
Quentin Young 86d488ce66
tools: improve checkpatch.sh
* Send reports to stderr; this allows you to get just the end result by
  redirecting stderr
* Don't attempt to copy nonexistent files

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-02-22 12:54:42 -05:00
Quentin Young 1e1c1e132b
tools: return exit status in checkpatch.sh
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-30 10:53:35 -05:00
Quentin Young f5fd113cbf
tools: enable stylechecker to handle new files
Since the tool is entirely diff based, it was having some issues diffing
things that didn't exist.

Also made it a bit smarter about ignoring kernel-specific style nits we
don't really care about.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-23 17:06:06 -05:00
Quentin Young a162e6a599
tools: add path support for checkpatch.sh
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-03 16:58:42 -05:00
Quentin Young 33fe08f4b1
tools: support unclean working directory
Adds ability to still work even when the user's base FRR directory is
not clean by caching index, working directory and deletion state in
various locations then restoring after done.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-12-20 12:54:10 -05:00
Quentin Young 3e4ae70277
tools: add style checking scripts
Add shell script and modified checkpatch.pl for use with patch files
targeting FRR.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-12-20 12:54:03 -05:00