Commit aad4f61
checkpatch: add --strict tests for braces, comments and casts
Add some more subjective --strict tests.
Add a test for block comments that start with a blank line followed only
by a line with just the comment block initiator. Prefer a blank line
followed by /* comment...
Add a test for unnecessary spaces after a cast.
Add a test for symmetric uses of braces in if/else blocks.
If one branch needs braces, then all branches should use braces.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent b337d8b commit aad4f61
1 file changed
Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1849 | 1849 | | |
1850 | 1850 | | |
1851 | 1851 | | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
1852 | 1863 | | |
1853 | 1864 | | |
1854 | 1865 | | |
| |||
2961 | 2972 | | |
2962 | 2973 | | |
2963 | 2974 | | |
2964 | | - | |
| 2975 | + | |
| 2976 | + | |
2965 | 2977 | | |
2966 | 2978 | | |
2967 | 2979 | | |
| |||
2972 | 2984 | | |
2973 | 2985 | | |
2974 | 2986 | | |
| 2987 | + | |
2975 | 2988 | | |
2976 | 2989 | | |
2977 | 2990 | | |
| |||
2984 | 2997 | | |
2985 | 2998 | | |
2986 | 2999 | | |
2987 | | - | |
| 3000 | + | |
2988 | 3001 | | |
2989 | 3002 | | |
2990 | | - | |
| 3003 | + | |
2991 | 3004 | | |
2992 | 3005 | | |
2993 | 3006 | | |
2994 | | - | |
| 3007 | + | |
2995 | 3008 | | |
2996 | 3009 | | |
2997 | 3010 | | |
2998 | | - | |
| 3011 | + | |
2999 | 3012 | | |
| 3013 | + | |
3000 | 3014 | | |
3001 | | - | |
3002 | | - | |
3003 | | - | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
3004 | 3028 | | |
3005 | 3029 | | |
3006 | 3030 | | |
| |||
0 commit comments