Skip to content

Commit

Permalink
Fixes commons-app#3405 Added spotlessCheck test to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yashk2000 committed Feb 13, 2020
1 parent 9a979a5 commit 846177a
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ android:
licenses:
- android-sdk-license-.+
script:
- "./gradlew -Pcoverage clean check jacocoTestReport"
- ./gradlew spotlessCheck
- "./gradlew -Pcoverage clean jacocoTestReport"
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
mkdir -p app/src/prodRelease/play/release-notes/en-US;
fi
Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if(isRunningOnTravisAndIsNotPRBuild) {
spotless {
java {
googleJavaFormat()
indentWithSpaces(4)
target '**/*.java'
}

Expand Down Expand Up @@ -45,6 +46,7 @@ dependencies {
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'org.apache.commons:commons-lang3:3.8.1'
implementation 'com.github.maskaravivek:wikimedia-android-data-client:v0.0.30'
compileOnly 'com.github.pengrad:jdk9-deps:1.0'

// UI
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ outside world (exported="false"). Even then, we should make sure to sanitize
In here, the only concat created argument is for id. It is cast to an int,
and will error out otherwise.
*/
*/
int uriType = uriMatcher.match(uri);
SQLiteDatabase sqlDB = dbOpenHelper.getWritableDatabase();
int rowsUpdated;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

public class ContributionDao {
/*
This sorts in the following order:
Currently Uploading
Failed (Sorted in ascending order of time added - FIFO)
Queued to Upload (Sorted in ascending order of time added - FIFO)
Completed (Sorted in descending order of time added)
This sorts in the following order:
Currently Uploading
Failed (Sorted in ascending order of time added - FIFO)
Queued to Upload (Sorted in ascending order of time added - FIFO)
Completed (Sorted in descending order of time added)
This is why Contribution.STATE_COMPLETED is -1.
This is why Contribution.STATE_COMPLETED is -1.
*/
static final String CONTRIBUTION_SORT =
Table.COLUMN_STATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public int update(
In here, the only concat created argument is for id. It is cast to an int, and will
error out otherwise.
*/
*/
int uriType = uriMatcher.match(uri);
SQLiteDatabase sqlDB = dbOpenHelper.getWritableDatabase();
int rowsUpdated;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void onAttach(Context context) {
all over again on same fragment attached to recreated activity, we do this network
operations on first time fragment attached to an activity. Then they will be retained
until fragment life time ends.
*/
*/
if (!isFragmentAttachedBefore && getActivity() != null) {
onAuthCookieAcquired();
isFragmentAttachedBefore = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void onCreate(Bundle savedInstanceState) {

// If nearby map was visible, call on Tab Selected to call all nearby operations
/*if (savedInstanceState.getInt("viewPagerCurrentItem") == 1) {
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged);
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged);
}*/
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ outside world (exported="false"). Even then, we should make sure to sanitize
In here, the only concat created argument is for id. It is cast to an int,
and will error out otherwise.
*/
*/
int uriType = uriMatcher.match(uri);
SQLiteDatabase sqlDB = dbOpenHelper.getWritableDatabase();
int rowsUpdated;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
if (visibility == VISIBLE) {
/*
Sometimes we need to preserve previous state of notification card view without getting
any data from user. Ie. wen user came back from Media Details fragment to Contrib List
fragment, we need to know what was the state of card view, and set it to exact same state.
Sometimes we need to preserve previous state of notification card view without getting
any data from user. Ie. wen user came back from Media Details fragment to Contrib List
fragment, we need to know what was the state of card view, and set it to exact same state.
*/
switch (cardViewVisibilityState) {
case READY:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public static <T> void startActivityWithFlags(Context context, Class<T> cls, int
}

/* This is a workaround for a known Android bug which is present in some API levels.
https://issuetracker.google.com/issues/36986021
https://issuetracker.google.com/issues/36986021
*/
@Override
protected void onNewIntent(Intent intent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
public class LongTitleMultiSelectListPreference extends MultiSelectListPreference {
/*
public LongTitleMultiSelectListPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
super(context, attrs, defStyleAttr, defStyleRes);
}
public LongTitleMultiSelectListPreference(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
super(context, attrs, defStyleAttr);
}
*/
public LongTitleMultiSelectListPreference(Context context, AttributeSet attrs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void showAlertDialog(

/*
Shows alert dialog with custom view
*/
*/
private static void showAlertDialog(
Activity activity,
String title,
Expand Down

0 comments on commit 846177a

Please sign in to comment.