Don't require breaking strings at spaces. This is not useful for strings
of hex characters, e.g.:
{ 123, "ffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffff"
"ffffffffffffffffffffffffffffffffffffffff"
Change-Id: Ib6be7744418530ae3ddbf373e67d1d7f25a60508
Fix false error:
ERROR:SPACING: need consistent spacing around '*' (ctx:WxV)
in a line with a typedef:
int handle_rab_ass_req(..., ranap_message *message);
Change-Id: Icbc46d0c788ca75684a48a73f739265f4a09b09c
Don't recommend to use ftrace instead of using __func__ inside printf.
This only applies to the linux kernel, not to the Osmocom code base.
Related: OS#5087
Related: https://gerrit.osmocom.org/c/libosmocore/+/6357
Change-Id: Ied23be32d3371a8b9ac9938a336474f71e7a3ccd
Don't complain about using braces when they could be omitted, for
example:
if (condition) {
single_statement();
}
Another example:
if (condition) {
single_statement();
} else {
another_single_statement();
}
This is not something we would care about in code review either from
what I've seen and so it's probably just annoying for patch authors to
fix up.
Related: OS#5087
Change-Id: Ice08d5b88c683a59bacff999a1d6c07754663d39
Not necessarily followed in Osmocom code, as Daniel wrote:
> The lint complains about this break, I don't agree with it though.
> Without we're one (or two) refactors away from an unintended
> fall-through
Related: OS#5087
Change-Id: I3f106510953b0b1bf70c28ceb55a431c5c03854e
In Osmocom code, we have the following written in one line:
while (osmo_select_main_ctx(1) > 0);
This currently causes the following linter error:
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
According to the linter, we should write it as follows:
while (osmo_select_main_ctx(1) > 0)
;
But this is not followed in Osmocom code, so let's ignore the check.
Related: OS#5087
Change-Id: Iaffe979b771c97c77edaf4aa0d232cb8939d1279
Does not make a noticable speed difference on a typical patch with few
changed files, but makes linting on big patches with ~1000 files and
lots of asn1c generated files in the repository significantly slower.
The next patch will optimize that case.
Change-Id: I7437d888b433fec8a444e4d7c285fff47d16c0c7
According to a comment in checkpatch.pl, these should automatically be
ignored when LONG_LINE is ignored. However I found that it's still
complaining about LONG_LINE_COMMENT, so explicitly disable it.
Related: OS#5087
Change-Id: I7aed3bfbfcb0b9e2f1d743b111e8418846f031d2
Mentioning the file in itself is useful sometimes (e.g. when explaining
how to use a contrib script). So do not let the linter fail here.
Related: OS#5087
Change-Id: I151b97bc7f2fe83898c0598db54360807956993c
Don't complain that macros such as __packed should be used, which are
defined in the Linux kernel but not in libosmocore.
For example:
src/gsm/gsm0808.c:85: WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((packed))
Related: OS#5087
Change-Id: I2bf3b7d60e99cf91f7b619af54167a11cdfae8c6