Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Oct 23, 2024
1 parent ff26971 commit 6f3a3b0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
final class MicrometerRules {
private MicrometerRules() {}

/** Prefer {@link Tags} over other immutable {@link Iterable}'s. */
/** Prefer using {@link Tags} over other immutable collections. */
static final class TagsOf1 {
@BeforeTemplate
ImmutableCollection<Tag> before(Tag tag) {
Expand All @@ -28,7 +28,7 @@ Iterable<Tag> after(Tag tag) {
}
}

/** Prefer {@link Tags} over other immutable {@link Iterable}'s. */
/** Prefer using {@link Tags} over other immutable collections. */
static final class TagsOf2 {
@BeforeTemplate
ImmutableCollection<Tag> before(Tag tag1, Tag tag2) {
Expand All @@ -41,7 +41,7 @@ Iterable<Tag> after(Tag tag1, Tag tag2) {
}
}

/** Prefer {@link Tags} over other immutable {@link Iterable}'s. */
/** Prefer using {@link Tags} over other immutable collections. */
static final class TagsOf3 {
@BeforeTemplate
ImmutableCollection<Tag> before(Tag tag1, Tag tag2, Tag tag3) {
Expand All @@ -54,7 +54,7 @@ Iterable<Tag> after(Tag tag1, Tag tag2, Tag tag3) {
}
}

/** Prefer {@link Tags} over other immutable {@link Iterable}'s. */
/** Prefer using {@link Tags} over other immutable collections. */
static final class TagsOf4 {
@BeforeTemplate
ImmutableCollection<Tag> before(Tag tag1, Tag tag2, Tag tag3, Tag tag4) {
Expand All @@ -68,7 +68,7 @@ Iterable<Tag> after(Tag tag1, Tag tag2, Tag tag3, Tag tag4) {
}
}

/** Prefer {@link Tags} over other immutable {@link Iterable}'s. */
/** Prefer using {@link Tags} over other immutable collections. */
static final class TagsOf5 {
@BeforeTemplate
ImmutableCollection<Tag> before(Tag tag1, Tag tag2, Tag tag3, Tag tag4, Tag tag5) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,45 @@ public ImmutableSet<Object> elidedTypesAndStaticImports() {

ImmutableSet<Iterable<Tag>> testTagsOf1() {
return ImmutableSet.of(
ImmutableSet.of(Tag.of("foo", "bar")), ImmutableList.of(Tag.of("foo", "bar")));
ImmutableSet.of(Tag.of("foo", "v1")), ImmutableList.of(Tag.of("bar", "v2")));
}

ImmutableSet<Iterable<Tag>> testTagsOf2() {
return ImmutableSet.of(
ImmutableSet.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")),
ImmutableList.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")));
ImmutableSet.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")),
ImmutableList.of(Tag.of("baz", "v3"), Tag.of("qux", "v4")));
}

ImmutableSet<Iterable<Tag>> testTagsOf3() {
return ImmutableSet.of(
ImmutableSet.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")),
ImmutableList.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")));
ImmutableSet.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3")),
ImmutableList.of(Tag.of("qux", "v4"), Tag.of("quux", "v5"), Tag.of("corge", "v6")));
}

ImmutableSet<Iterable<Tag>> testTagsOf4() {
return ImmutableSet.of(
ImmutableSet.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3")),
Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")),
ImmutableList.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3")));
Tag.of("quux", "v5"),
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8")));
}

ImmutableSet<Iterable<Tag>> testTagsOf5() {
return ImmutableSet.of(
ImmutableSet.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3"),
Tag.of("foo4", "bar4")),
Tag.of("foo", "v1"),
Tag.of("bar", "v2"),
Tag.of("baz", "v3"),
Tag.of("qux", "v4"),
Tag.of("quux", "v5")),
ImmutableList.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3"),
Tag.of("foo4", "bar4")));
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8"),
Tag.of("waldo", "v9"),
Tag.of("fred", "v10")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,44 @@ public ImmutableSet<Object> elidedTypesAndStaticImports() {
}

ImmutableSet<Iterable<Tag>> testTagsOf1() {
return ImmutableSet.of(Tags.of(Tag.of("foo", "bar")), Tags.of(Tag.of("foo", "bar")));
return ImmutableSet.of(Tags.of(Tag.of("foo", "v1")), Tags.of(Tag.of("bar", "v2")));
}

ImmutableSet<Iterable<Tag>> testTagsOf2() {
return ImmutableSet.of(
Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")),
Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1")));
Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2")),
Tags.of(Tag.of("baz", "v3"), Tag.of("qux", "v4")));
}

ImmutableSet<Iterable<Tag>> testTagsOf3() {
return ImmutableSet.of(
Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")),
Tags.of(Tag.of("foo", "bar"), Tag.of("foo1", "bar1"), Tag.of("foo2", "bar2")));
Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3")),
Tags.of(Tag.of("qux", "v4"), Tag.of("quux", "v5"), Tag.of("corge", "v6")));
}

ImmutableSet<Iterable<Tag>> testTagsOf4() {
return ImmutableSet.of(
Tags.of(Tag.of("foo", "v1"), Tag.of("bar", "v2"), Tag.of("baz", "v3"), Tag.of("qux", "v4")),
Tags.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3")),
Tags.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3")));
Tag.of("quux", "v5"),
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8")));
}

ImmutableSet<Iterable<Tag>> testTagsOf5() {
return ImmutableSet.of(
Tags.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3"),
Tag.of("foo4", "bar4")),
Tag.of("foo", "v1"),
Tag.of("bar", "v2"),
Tag.of("baz", "v3"),
Tag.of("qux", "v4"),
Tag.of("quux", "v5")),
Tags.of(
Tag.of("foo", "bar"),
Tag.of("foo1", "bar1"),
Tag.of("foo2", "bar2"),
Tag.of("foo3", "bar3"),
Tag.of("foo4", "bar4")));
Tag.of("corge", "v6"),
Tag.of("grault", "v7"),
Tag.of("garply", "v8"),
Tag.of("waldo", "v9"),
Tag.of("fred", "v10")));
}
}

0 comments on commit 6f3a3b0

Please sign in to comment.