-
Notifications
You must be signed in to change notification settings - Fork 2
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
CLDR-17316 cldr-apps-webdriver Java formatting with spotless #41
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
377 changes: 222 additions & 155 deletions
377
src/test/java/org/unicode/cldr/surveydriver/SurveyDriver.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,15 @@ public class SurveyDriverCredentials { | |
* "[email protected]" | ||
*/ | ||
private static final String EMAIL_AT_DOMAIN = "@cldr-apps-webdriver.org"; | ||
|
||
private static final String EMAIL_PREFIX = "driver-"; | ||
|
||
/** | ||
* cldr-apps-webdriver/src/test/resources/org/unicode/cldr/surveydriver/surveydriver.properties | ||
* -- not in version control; contains a line WEBDRIVER_PASSWORD=... | ||
*/ | ||
private static final String PROPS_FILENAME = "surveydriver.properties"; | ||
|
||
private static final String PROPS_PASSWORD_KEY = "WEBDRIVER_PASSWORD"; | ||
private static String webdriverPassword = null; | ||
|
||
|
@@ -27,8 +29,8 @@ private SurveyDriverCredentials(String email) { | |
} | ||
|
||
/** | ||
* Get credentials for logging in as a particular user depending on which Selenium slot | ||
* we're running on. | ||
* Get credentials for logging in as a particular user depending on which Selenium slot we're | ||
* running on. | ||
*/ | ||
public static SurveyDriverCredentials getForUser(int userIndex) { | ||
String email = EMAIL_PREFIX + userIndex + EMAIL_AT_DOMAIN; | ||
|
@@ -43,7 +45,8 @@ public String getPassword() { | |
if (webdriverPassword != null) { | ||
return webdriverPassword; | ||
} | ||
final InputStream stream = SurveyDriverCredentials.class.getResourceAsStream(PROPS_FILENAME); | ||
final InputStream stream = | ||
SurveyDriverCredentials.class.getResourceAsStream(PROPS_FILENAME); | ||
if (stream == null) { | ||
throw new RuntimeException("File not found: " + PROPS_FILENAME); | ||
} | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@srl295 I'm a little surprised that cldr didn't need this, which enables spotless:on/off comments for disabling formatting of a few long arrays... probably those arrays should be implemented differently anyway but I think this is better than one item per line...
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.
CLDR probably needs this but didn't know about it. we just let spotless do what it wants to do. want to file an issue and/or put on the infra agenda?
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'll put it on the agenda. I don't remember any specific instances of anyone being unhappy with the spotless results. I just vaguely recall such issues when various formatting options were being considered.
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.
anyway is this PR okay?