rspec/rules/S3340/java/rule.adoc

44 lines
708 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
For optimal code readability, annotation arguments should be specified in the same order that they were declared in the annotation definition.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
@interface Pet {
String name();
String surname();
}
@Pet(surname ="", name="") // Noncompliant
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
@interface Pet {
String name();
String surname();
}
@Pet(name ="", surname="") // Compliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]