mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	checkpatch: kconfig: prefer 'help' over '---help---'
IMO, we should discourage '---help---' for new help texts, even in cases
where it would be consistent with other help texts in the file. This
will help if we ever want to get rid of '---help---' in the future.
Also simplify the code to only check for exactly '---help---'. Since
commit c2264564df ("kconfig: warn of unhandled characters in Kconfig
commands"), '---help---' is a proper keyword and can only appear in that
form. Prior to that commit, '---help---' working was more of a syntactic
quirk.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
			
			
This commit is contained in:
		
							parent
							
								
									678ae162dd
								
							
						
					
					
						commit
						84af7a6194
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -2817,7 +2817,11 @@ sub process {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
 | 
									if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
 | 
				
			||||||
					$is_start = 1;
 | 
										$is_start = 1;
 | 
				
			||||||
				} elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {
 | 
									} elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) {
 | 
				
			||||||
 | 
										if ($lines[$ln - 1] =~ "---help---") {
 | 
				
			||||||
 | 
											WARN("CONFIG_DESCRIPTION",
 | 
				
			||||||
 | 
											     "prefer 'help' over '---help---' for new help texts\n" . $herecurr);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
					$length = -1;
 | 
										$length = -1;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue