mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
27 lines
853 B
HTML
27 lines
853 B
HTML
<html>
|
|
<body>
|
|
Reports properties that do not follow the naming conventions.
|
|
<p>The following properties are reported:</p>
|
|
<ul>
|
|
<li>Top-level properties</li>
|
|
<li>Properties in objects and companion objects</li>
|
|
</ul>
|
|
<p>You can specify the required pattern in the inspection options.</p>
|
|
<p><a href="https://kotlinlang.org/docs/coding-conventions.html#naming-rules">Recommended naming conventions</a>: it has to start with an uppercase letter, use camel case and no underscores.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
// top-level property
|
|
val USER_NAME_FIELD = "UserName"
|
|
// top-level property holding reference to singleton object
|
|
val PersonComparator: Comparator<Person> = /*...*/
|
|
|
|
class Person {
|
|
companion object {
|
|
// property in companion object
|
|
val NO_NAME = Person()
|
|
}
|
|
}
|
|
</code></pre>
|
|
|
|
</body>
|
|
</html> |