This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE Dev (Build 201506070001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15 System: Windows 8 version 6.2 running on amd64; UTF-8; pl_PL (nb) The default pattern for constant naming convention is: ([A-Z][A-Z\d]+_?)*[A-Z\d]+ It gives warnings for constants like: AM_I_RIGHT ON_A_TABLE VERSION_2_0 X_123 For some reason it doesn't allow a single letter or digit between underscores. Why the pattern isn't for example like this: ([A-Z\d]+_?)*[A-Z\d]+
Better "([A-Z][A-Z\\d]*_?)*[A-Z\\d]+" -- should start with a letter. Fixed in jet-main#ba63be1e0997
Your pattern matches invalid identifiers, for example: 4DOS And it doesn't match some valid ones, like: VERSION_2_0
OK, so what about :) [A-Z]([A-Z\\d]*_)*[A-Z\\d]+ - starting with a letter - followed by 0-n alphanum sequences with trailing _ separating words - terminated by non-empty alphanum sequence.
(In reply to Svata Dedic from comment #3) > OK, so what about :) > [A-Z]([A-Z\\d]*_)*[A-Z\\d]+ Way better, but it's worth noting that it doesn't allow single letter constants.
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ba63be1e0997 User: Svata Dedic <sdedic@netbeans.org> Log: #253096, #252965: adjusted default pattern. Enabled only immutable checking by default.