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
  • Dwaipayan Ray's avatar
    checkpatch: add new exception to repeated word check · 1db81a68
    Dwaipayan Ray authored Dec 15, 2020
    Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test")
    moved the repeated word test to check for more file types. But after
    this, if checkpatch.pl is run on MAINTAINERS, it generates several
    new warnings of the type:
    
      WARNING: Possible repeated word: 'git'
    
    For example:
    
      WARNING: Possible repeated word: 'git'
      +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git
    
    So, the pattern "git git://..." is a false positive in this case.
    
    There are several other combinations which may produce a wrong warning
    message, such as "@size size", ":Begin begin", etc.
    
    Extend repeated word check to compare the characters before and after
    the word matches.
    
    If there is a non whitespace character before the first word or a non
    whitespace character excluding punctuation characters after the second
    word, then the check is skipped and the warning is avoided.
    
    Also add case insensitive word matching to the repeated word check.
    
    Link: https://lore.kernel.org/linux-kernel-mentees/81b6a0bb2c7b9256361573f7a13201ebcd4876f1.camel@perches.com/
    Link: https://lkml.kernel.org/r/20201017162732.152351-1-dwaipayanray1@gmail.com
    
    
    Signed-off-by: default avatarDwaipayan Ray <dwaipayanray1@gmail.com>
    Suggested-by: default avatarJoe Perches <joe@perches.com>
    Suggested-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
    Acked-by: default avatarJoe Perches <joe@perches.com>
    Cc: Aditya Srivastava <yashsri421@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    1db81a68
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7