rsyslog/devtools/check-codestyle.sh
2018-08-01 16:11:33 +02:00

222 lines
5.5 KiB
Bash
Executable File

#!/bin/bash
# this checks the rsyslog codestyle. It expects that
# rsyslog_stylecheck
# is already installed inside the system
# if in doubt, run it on one of the development containers
set -e
find -name "*.[ch]" | xargs rsyslog_stylecheck -w -f -l 120
# Note: we do stricter checks for some code sources that have been
# sufficiently cleaned up.
rsyslog_stylecheck -l 120 compat/ifaddrs.h \
tests/override_getaddrinfo.c \
tests/ourtail.c \
tests/filewriter.c \
tests/omrelp_dflt_port.c \
tests/chkseq.c \
tests/getline.c \
tests/rt-init.c \
tests/override_gethostname_nonfqdn.c \
tests/inputfilegen.c \
tests/msleep.c \
tests/testconfgen.c \
tests/testbench.h \
tests/uxsockrcvr.c \
tests/tcpflood.c \
plugins/imfile/imfile.c \
plugins/imrelp/imrelp.c \
plugins/omrelp/omrelp.c \
plugins/external/skeletons/C/c_sample.c \
plugins/imsolaris/imsolaris.h \
plugins/imsolaris/sun_cddl.h \
plugins/imklog/solaris_cddl.h \
plugins/imtcp/imtcp.c \
plugins/mmnormalize/mmnormalize.c \
plugins/mmsnmptrapd/mmsnmptrapd.c \
plugins/imklog/imklog.c \
plugins/imklog/imklog.h \
plugins/imklog/solaris_cddl.c \
plugins/imklog/bsd.c \
plugins/imklog/solaris.c \
plugins/omlibdbi/omlibdbi.c \
plugins/omuxsock/omuxsock.c \
plugins/omjournal/omjournal.c \
plugins/mmexternal/mmexternal.c \
plugins/ommysql/ommysql.c \
plugins/omstdout/omstdout.c \
plugins/omkafka/omkafka.c \
plugins/omhdfs/omhdfs.c \
plugins/omtesting/omtesting.c \
plugins/imjournal/imjournal.c \
plugins/ommail/ommail.c \
plugins/mmutf8fix/mmutf8fix.c \
plugins/imdiag/imdiag.c \
plugins/mmrm1stspace/mmrm1stspace.c \
plugins/pmnull/pmnull.c \
plugins/pmlastmsg/pmlastmsg.c \
plugins/im3195/im3195.c \
plugins/immark/immark.c \
plugins/immark/immark.h \
plugins/imsolaris/imsolaris.c \
plugins/imsolaris/sun_cddl.c \
plugins/omgssapi/omgssapi.c \
plugins/imptcp/imptcp.c \
plugins/mmjsonparse/mmjsonparse.c \
plugins/ompgsql/ompgsql.c \
plugins/imkafka/imkafka.c \
plugins/mmaudit/mmaudit.c \
plugins/omruleset/omruleset.c \
plugins/mmfields/mmfields.c \
plugins/fmhttp/fmhttp.c \
plugins/impstats/impstats.c \
plugins/omprog/omprog.c \
plugins/pmnormalize/pmnormalize.c \
plugins/imudp/imudp.c \
plugins/mmpstrucdata/mmpstrucdata.c \
plugins/mmanon/mmanon.c \
plugins/mmdblookup/mmdblookup.c \
plugins/omudpspoof/omudpspoof.c \
plugins/omsnmp/omsnmp.c \
plugins/imuxsock/imuxsock.c \
plugins/pmciscoios/pmciscoios.c \
plugins/imgssapi/imgssapi.c \
plugins/ommongodb/ommongodb.c \
grammar/testdriver.c \
runtime/netstrms.h \
runtime/lib_ksi_queue.h \
runtime/var.c \
runtime/glbl.h \
runtime/nsdsel_ptcp.h \
runtime/strgen.h \
runtime/rsyslog.h \
runtime/strgen.c \
runtime/dynstats.h \
runtime/nsdpoll_ptcp.h \
runtime/im-helper.h \
runtime/queue.h \
runtime/atomic.h \
runtime/datetime.h \
runtime/obj.h \
runtime/lib_ksils12.h \
runtime/nsdsel_gtls.h \
runtime/batch.h \
runtime/cfsysline.c \
runtime/wti.h \
runtime/nssel.c \
runtime/netstrm.c \
runtime/nsd_gtls.c \
runtime/ratelimit.c \
runtime/netstrms.c \
runtime/objomsr.h \
runtime/ruleset.h \
runtime/wtp.c \
runtime/dynstats.c \
runtime/nsdpoll_ptcp.c \
runtime/wtp.h \
runtime/lmcry_gcry.h \
runtime/lmsig_ksi-ls12.c \
runtime/strms_sess.h \
runtime/lookup.c \
runtime/glbl.c \
runtime/nssel.h \
runtime/regexp.h \
runtime/debug.h \
runtime/statsobj.h \
runtime/nsd_ptcp.h \
runtime/datetime.c \
runtime/ratelimit.h \
runtime/syslogd-types.h \
runtime/zlibw.h \
runtime/errmsg.c \
runtime/sigprov.h \
runtime/modules.c \
runtime/cryprov.h \
runtime/net.h \
runtime/nsdsel_ptcp.c \
runtime/stringbuf.c \
runtime/prop.c \
runtime/rsconf.c \
runtime/stringbuf.h \
runtime/objomsr.c \
runtime/hashtable_private.h \
runtime/netstrm.h \
runtime/nspoll.c \
runtime/rsconf.h \
runtime/lmcry_gcry.c \
runtime/obj-types.h \
runtime/janitor.h \
runtime/libgcry.h \
runtime/msg.h \
runtime/tcpclt.h \
runtime/rsyslog.c \
runtime/zlibw.c \
runtime/wti.c \
runtime/errmsg.h \
runtime/ruleset.c \
runtime/libgcry.c \
runtime/dnscache.h \
runtime/tcpsrv.h \
runtime/janitor.c \
runtime/linkedlist.c \
runtime/tcpsrv.c \
runtime/gss-misc.c \
runtime/obj.c \
runtime/hashtable/hashtable_utility.c \
runtime/conf.c \
runtime/hashtable_itr.h \
runtime/debug.c \
runtime/parser.h \
runtime/strmsrv.c \
runtime/queue.c \
runtime/lib_ksi_queue.c \
runtime/typedefs.h \
runtime/tcpclt.c \
runtime/statsobj.c \
runtime/dnscache.c \
runtime/unlimited_select.h \
runtime/srutils.c \
runtime/nsd_ptcp.c \
runtime/net.c \
runtime/msg.c \
runtime/hashtable_itr.c \
runtime/librsksi_read.c \
runtime/hashtable/tester.c \
runtime/hashtable.c \
contrib/mmkubernetes/mmkubernetes.c \
contrib/mmrfc5424addhmac/mmrfc5424addhmac.c \
contrib/mmcount/mmcount.c \
contrib/pmsnare/pmsnare.c \
contrib/fmhash/fmhash.c \
contrib/pmcisconames/pmcisconames.c \
contrib/mmsequence/mmsequence.c \
contrib/imczmq/imczmq.c \
contrib/omtcl/omtcl.c \
contrib/pmaixforwardedfrom/pmaixforwardedfrom.c \
contrib/omfile-hardened/omfile-hardened.c \
contrib/imkmsg/imkmsg.h \
contrib/imkmsg/imkmsg.c \
contrib/imkmsg/kmsg.c \
contrib/omhiredis/omhiredis.c \
contrib/omczmq/omczmq.c \
contrib/omrabbitmq/omrabbitmq.c \
compat/getifaddrs.c \
grammar/rainerscript.h \
grammar/rainerscript.c \
tools/omfile.c \
tools/rsyslogd.c \
tools/syncdemo.c \
tools/syslogd.c \
tools/logctl.c \
tools/omfwd.c \
tools/pmrfc3164.c \
tools/rscryutil.c \
tools/pmrfc5424.c \
tools/ompipe.c \
parse.c \
parse.h \
action.h \
template.h \
threads.c \
outchannel.c \
action.c \
template.c