-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Formatting: keep simple if / else on the same line #51526
Merged
pugnascotia
merged 1 commit into
elastic:master
from
pugnascotia:formatter-config-single-line-if-else
Jan 28, 2020
Merged
Formatting: keep simple if / else on the same line #51526
pugnascotia
merged 1 commit into
elastic:master
from
pugnascotia:formatter-config-single-line-if-else
Jan 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pugnascotia
added
:Core/Infra/Core
Core issues without another label
v8.0.0
v7.7.0
v7.6.1
labels
Jan 28, 2020
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
pugnascotia
force-pushed
the
formatter-config-single-line-if-else
branch
from
January 28, 2020 10:54
bde76de
to
3c1fb8d
Compare
jasontedor
approved these changes
Jan 28, 2020
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.
LGTM.
For some additional background, I tried enabling the CheckStyle rule for braces, and it triggered over 900 errors, so I don’t think want to go down the road of mandating such braces at the moment. |
albertzaharovits
pushed a commit
to albertzaharovits/elasticsearch
that referenced
this pull request
Jan 28, 2020
Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
pugnascotia
added a commit
to pugnascotia/elasticsearch
that referenced
this pull request
Jan 28, 2020
Backport of elastic#51526. Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
pugnascotia
added a commit
to pugnascotia/elasticsearch
that referenced
this pull request
Jan 28, 2020
Backport of elastic#51526. Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
albertzaharovits
added a commit
that referenced
this pull request
Jan 28, 2020
* Done * Update docs/reference/settings/security-settings.asciidoc Co-Authored-By: Ioannis Kakavas <[email protected]> * Update docs/reference/settings/security-settings.asciidoc Co-Authored-By: Ioannis Kakavas <[email protected]> * refactored ldap_search explanation * Tim's review! * [ML] Use CSV ingest processor in find_file_structure ingest pipeline (#51492) Changes the find_file_structure response to include a CSV ingest processor in the ingest pipeline it suggests. Previously the Kibana file upload functionality parsed CSV in the browser, but by parsing CSV in the ingest pipeline it makes the Kibana file upload functionality more easily interchangable with Filebeat such that the configurations it creates can more easily be used to import data with the same structure repeatedly in production. * Add test verify replica allocator with sync_id (#51512) We no longer issue new sync_ids in 8.0, but we still need to make sure that the replica allocator prefers copies with matching sync_id. This commit adds tests for that. Relates #50776 * Formatting: keep simple if / else on the same line (#51526) Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line. * Nits Co-authored-by: Ioannis Kakavas <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: David Roberts <[email protected]> Co-authored-by: Nhat Nguyen <[email protected]> Co-authored-by: Rory Hunter <[email protected]>
pugnascotia
added a commit
that referenced
this pull request
Jan 29, 2020
Backport of #51526. Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
pugnascotia
added a commit
that referenced
this pull request
Jan 29, 2020
Backport of #51526. Previous the formatter was breaking simple if/else statements (i.e. without braces) onto separate lines, which could be fragile because the formatter cannot also introduce braces. Instead, keep such expressions on the same line.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous the formatter was breaking simple if/else statements (i.e.
without braces) onto separate lines, which could be fragile because the
formatter cannot also introduce braces. Instead, keep such expressions
on the same line.