mirror of https://gerrit.osmocom.org/osmo-ci
lint: checkpatch: don't require space in T=-1234
Inside struct osmo_tdef we write non-spec timers as T=-1234. Do not complain about having no space before the minus character. Example: { .T=-25, .default_val=5, .desc="Timeout for ..." }, Note that the Linux kernel coding style also requires spaces around the equals signs. We follow that everywhere except for struct osmo_tdef, and the linter has already been adjusted for that in I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c. Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
This commit is contained in:
parent
fe6512a5ba
commit
1abb6f35bf
|
@ -5077,11 +5077,16 @@ sub process {
|
|||
$opv eq '*U' || $opv eq '-U' ||
|
||||
$opv eq '&U') { # Osmocom specific: &&U removed
|
||||
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
|
||||
if (ERROR("SPACING",
|
||||
"space required before that '$op' $at\n" . $hereptr)) {
|
||||
if ($n != $last_after + 2) {
|
||||
$good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
|
||||
$line_fixed = 1;
|
||||
# Osmocom specific: inside struct osmo_tdef we write non-spec timers as
|
||||
# T=-1234. Do not complain about having no space before the minus
|
||||
# character.
|
||||
if ($opline !~ /\.T=/) {
|
||||
if (ERROR("SPACING",
|
||||
"space required before that '$op' $at\n" . $hereptr)) {
|
||||
if ($n != $last_after + 2) {
|
||||
$good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
|
||||
$line_fixed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue