aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorJoe Perches <[email protected]>2012-02-03 23:20:39 +0000
committerLinus Torvalds <[email protected]>2012-02-07 23:53:08 +0000
commit8eef05dd3e70233f3e391774d612dab44c3f023b (patch)
treedda65b15abaa42564d2e46424bfe6a7a73cc5681 /fs/jbd2/commit.c
parentMerge tag 'ib-srpt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ro... (diff)
downloadkernel-8eef05dd3e70233f3e391774d612dab44c3f023b.tar.gz
kernel-8eef05dd3e70233f3e391774d612dab44c3f023b.zip
checkpatch: Warn on code with 6+ tab indentation
Overly indented code should be refactored. Suggest refactoring excessive indentation of of if/else/for/do/while/switch statements. For example: $ cat t.c #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { if (1) if (2) if (3) if (4) if (5) if (6) if (7) if (8) ; return 0; } $ ./scripts/checkpatch.pl -f t.c WARNING: Too many leading tabs - consider code refactoring #12: FILE: t.c:12: + if (6) WARNING: Too many leading tabs - consider code refactoring #13: FILE: t.c:13: + if (7) WARNING: Too many leading tabs - consider code refactoring #14: FILE: t.c:14: + if (8) total: 0 errors, 3 warnings, 17 lines checked t.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions