Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • checkpatch.pl
Find file BlameHistoryPermalink
  • Joe Perches's avatar
    checkpatch: add test for assignment at start of line · 6a487211
    Joe Perches authored Apr 10, 2018
    Kernel style seems to prefer line wrapping an assignment with the
    assignment operator on the previous line like:
    
    	<leading tabs>	identifier =
    				expression;
    over
    	<leading tabs>	identifier
    				= expression;
    
    somewhere around a 50:1 ratio
    
    $ git grep -P "[^=]=\s*$" -- "*.[ch]" | wc -l
    52008
    $ git grep -P "^\s+[\*\/\+\|\%\-]?=[^=>]" | wc -l
    1161
    
    So add a --strict test for that condition.
    
    Link: http://lkml.kernel.org/r/1522275726.2210.12.camel@perches.com
    
    
    Signed-off-by: default avatarJoe Perches <joe@perches.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6a487211
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7