Guidelines
Spacing
- All annotations should be on their own line
@TestVisible
is the rare exception
Capitalization
- As exampled in the documentation the first letter of each word should be capitalized.
Checkstyle Rules
<!-- annotations -->
<!-- List of annotations https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation.htm -->
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)AuraEnabled)(?i)auraenabled)" />
<property name="message" value="Annotation should be capitalized as "AuraEnabled"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)Deprecated)(?i)deprecated)" />
<property name="message" value="Annotation should be capitalized as "Deprecated"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)Future)(?i)future)" />
<property name="message" value="Annotation should be capitalized as "Future"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)InvocableMethod)(?i)invocablemethod)" />
<property name="message" value="Annotation should be capitalized as "InvocableMethod"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)InvocableVariable)(?i)invocablevariable)" />
<property name="message" value="Annotation should be capitalized as "InvocableVariable"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)IsTest)(?i)istest)" />
<property name="message" value="Annotation should be capitalized as "IsTest"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)ReadOnly)(?i)readonly)" />
<property name="message" value="Annotation should be capitalized as "ReadOnly"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)RemoteAction)(?i)remoteaction)" />
<property name="message" value="Annotation should be capitalized as "RemoteAction"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)TestSetup)(?i)testsetup)" />
<property name="message" value="Annotation should be capitalized as "TestSetup"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)TestVisible)(?i)testvisible)" />
<property name="message" value="Annotation should be capitalized as "TestVisible"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)RestResource)(?i)restresource)" />
<property name="message" value="Annotation should be capitalized as "RestResource"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)HttpDelete)(?i)httpdelete)" />
<property name="message" value="Annotation should be capitalized as "HttpDelete"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)HttpGet)(?i)httpget)" />
<property name="message" value="Annotation should be capitalized as "HttpGet"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)HttpPatch)(?i)httppatch)" />
<property name="message" value="Annotation should be capitalized as "HttpPatch"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)HttpPost)(?i)httppost)" />
<property name="message" value="Annotation should be capitalized as "HttpPost"" />
</module>
<module name="RegexpSingleline">
<property name="format" value="@((?!(?-i)HttpPut)(?i)httpput)" />
<property name="message" value="Annotation should be capitalized as "HttpPut"" />
</module>