* + checkpatch-add-strict-test-for-concatenated-string-elements.patch added to -mm tree
@ 2014-09-05 22:11 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2014-09-05 22:11 UTC (permalink / raw)
To: joe, mm-commits
The patch titled
Subject: checkpatch: add --strict test for concatenated string elements
has been added to the -mm tree. Its filename is
checkpatch-add-strict-test-for-concatenated-string-elements.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-add-strict-test-for-concatenated-string-elements.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-add-strict-test-for-concatenated-string-elements.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Joe Perches <joe@perches.com>
Subject: checkpatch: add --strict test for concatenated string elements
Using a space between concatenated string elements is easier for a human
to read.
ie:
"String"FOO"bar"
is easier to read as:
"String" FOO "bar"
So suggest this style with a --strict command line option.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 6 ++++++
1 file changed, 6 insertions(+)
diff -puN scripts/checkpatch.pl~checkpatch-add-strict-test-for-concatenated-string-elements scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-add-strict-test-for-concatenated-string-elements
+++ a/scripts/checkpatch.pl
@@ -4344,6 +4344,12 @@ sub process {
"Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr);
}
+# concatenated string without spaces between elements
+ if ($line =~ /"X+"[A-Z_]+/ || $line =~ /[A-Z_]+"X+"/) {
+ CHK("CONCATENATED_STRING",
+ "Concatenated strings should use spaces between elements\n" . $herecurr);
+ }
+
# warn about #if 0
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
CHK("REDUNDANT_CODE",
_
Patches currently in -mm which might be from joe@perches.com are
checkpatch-allow-commit-descriptions-on-separate-line-from-commit-id.patch
mm-utilc-add-kstrimdup.patch
checkpatch-fix-spello.patch
checkpatch-remove-debugging-message.patch
checkpatch-update-allowed_asm_includes-macros-add-rebooth-and-timeh.patch
checkpatch-enable-whitespace-checks-for-dts-files.patch
checkpatch-allow-optional-shorter-config-descriptions.patch
checkpatch-allow-optional-shorter-config-descriptions-v4.patch
checkpatch-add-strict-test-for-concatenated-string-elements.patch
ipc-always-handle-a-new-value-of-auto_msgmni.patch
linux-next.patch
lib-string_helpers-move-documentation-to-c-file.patch
lib-string_helpers-refactoring-the-test-suite.patch
lib-string_helpers-introduce-string_escape_mem.patch
lib-vsprintf-add-%pe-format-specifier.patch
wireless-libertas-print-esaped-string-via-%pe.patch
wireless-ipw2x00-print-ssid-via-%pe.patch
wireless-hostap-proc-print-properly-escaped-ssid.patch
wireless-hostap-proc-print-properly-escaped-ssid-fix.patch
lib80211-remove-unused-print_ssid.patch
staging-wlan-ng-use-%pehp-to-print-sn.patch
staging-rtl8192e-use-%pen-to-escape-buffer.patch
staging-rtl8192u-use-%pen-to-escape-buffer.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-05 22:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 22:11 + checkpatch-add-strict-test-for-concatenated-string-elements.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.