GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — New Check: GoogleMethodName to fix false-negative on method names with underscores · Issue #17841 · checkstyle/checkstyle Closed Closed Copy link Milestone DescriptionFrom: https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
Google style is not exact. On one hand it says Valid uses of underscore : Invalid uses of underscore: Note: Underscores are not allowed in normal method names. Name has to have the numbering format part at the end. Following are all invalid Some false-negatives left to address from #17708 $ cat NamesWithUnderscores.java /** some javadoc. */ public class NamesWithUnderscores { void gradle9_5_1_() {} // Expected violation, _ at the end void gradle_9_5_1() {} // Expected violation, _ between digit and letter void jdk_9_0_392() {} // Expected violation, _ between digit and letter void testing_01231(String str) {} // Expected violation, _ between digit and letter } We probably need a better approach than Regex. Current regex has already grown very complex. checkstyle/src/main/resources/google_checks.xml Lines 436 to 438 in 5d52248
if special check is needed, it should first determine the type of name - regular or name with numbering and then it should validate the name against the appropriate regex format, which will differ for each type of naming Keep in mind: unless it's a non-regular name i.e name that has number formating suffix at the end or method with Activity
MetadataMetadataAssigneesTypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |