-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-formatting tweaks #47299
Auto-formatting tweaks #47299
Changes from 3 commits
7bf64a2
b50783b
568e48d
c34c973
ac88244
5d804b3
4919dec
0e89245
1ae31b9
a4c1ffd
97a28d6
c05a87e
5c32bca
d37d4e8
03ce841
faa2573
2e02711
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,25 +145,31 @@ public enum QueryType { | |
INTERSECTS { | ||
@Override | ||
boolean matches(BytesRef from, BytesRef to, BytesRef otherFrom, BytesRef otherTo) { | ||
// part of the other range must touch this range | ||
// this: |---------------| | ||
// other: |------| | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this converted to a multiline comment? Is there some problem with using several single line comments with the formatter? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I observed the formatted mangling these diagrams, hence the change. You can ask the formatter to process block and javadoc comments, but I decided that wasn't worth it. |
||
* part of the other range must touch this range | ||
* this: |---------------| | ||
* other: |------| | ||
*/ | ||
return from.compareTo(otherTo) <= 0 && to.compareTo(otherFrom) >= 0; | ||
} | ||
}, WITHIN { | ||
@Override | ||
boolean matches(BytesRef from, BytesRef to, BytesRef otherFrom, BytesRef otherTo) { | ||
// other range must entirely lie within this range | ||
// this: |---------------| | ||
// other: |------| | ||
/* | ||
* other range must entirely lie within this range | ||
* this: |---------------| | ||
* other: |------| | ||
*/ | ||
return from.compareTo(otherFrom) <= 0 && to.compareTo(otherTo) >= 0; | ||
} | ||
}, CONTAINS { | ||
@Override | ||
boolean matches(BytesRef from, BytesRef to, BytesRef otherFrom, BytesRef otherTo) { | ||
// this and other range must overlap | ||
// this: |------| | ||
// other: |---------------| | ||
/* | ||
* this and other range must overlap | ||
* this: |------| | ||
* other: |---------------| | ||
*/ | ||
return from.compareTo(otherFrom) >= 0 && to.compareTo(otherTo) <= 0; | ||
} | ||
}, CROSSES { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an important tool we should document in our CONTRIBUTING.md? (separate from this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add it to
CONTRIBUTING.md
, I should have adding it in the last PR to be honest.