Skip to content

Commit

Permalink
More static-analysis fixes after dependency updates
Browse files Browse the repository at this point in the history
Also realized CI was not running all tests 🙈
  • Loading branch information
tasomaniac committed Dec 31, 2021
1 parent bbbb51e commit 462b99f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
${{ runner.os }}-gradle-
- name: Run checks
run: ./gradlew evaluateViolations testFlossDebugUnitTest -s
run: ./gradlew evaluateViolations testDebugUnitTest testFlossDebugUnitTest -s
3 changes: 3 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ class DebugSettings @Inject constructor(
.setType("text/plain")
.createChooserIntent()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SettingsActivity :
SharedPreferences.OnSharedPreferenceChangeListener,
PreferenceFragmentCompat.OnPreferenceStartFragmentCallback {

@Inject @field:TutorialShown lateinit var tutorialShown: BooleanPreference
@Inject @TutorialShown lateinit var tutorialShown: BooleanPreference
@Inject lateinit var analytics: Analytics
@Inject lateinit var sharedPreferences: SharedPreferences

Expand Down
25 changes: 0 additions & 25 deletions app/src/main/res/values/strings-debug.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pref_key_category_debug" translatable="false">pref_debug</string>
<string name="pref_title_category_debug" translatable="false">Debug</string>

<string name="pref_key_debug_amazon" translatable="false">pref_debug_amazon</string>
<string name="pref_title_debug_amazon" translatable="false">Amazon Intent</string>

<string name="pref_key_debug_maps" translatable="false">pref_debug_maps</string>
<string name="pref_title_debug_maps" translatable="false">Maps Intent</string>

<string name="pref_key_debug_instagram" translatable="false">pref_debug_instagram</string>
<string name="pref_title_debug_instagram" translatable="false">Instagram Intent</string>

<string name="pref_key_debug_hangouts" translatable="false">pref_debug_hangouts</string>
<string name="pref_title_debug_hangouts" translatable="false">Hangouts Intent</string>

<string name="pref_key_debug_play" translatable="false">pref_debug_play</string>
<string name="pref_title_debug_play" translatable="false">Play Store Intent</string>

<string name="pref_key_debug_redirect" translatable="false">pref_debug_redirect</string>
<string name="pref_title_debug_redirect" translatable="false">Url with redirect</string>

<string name="pref_key_debug_non_http" translatable="false">pref_debug_non_http</string>
<string name="pref_title_debug_non_http" translatable="false">Non-Http url</string>

<string name="pref_key_debug_missing_http" translatable="false">pref_debug_missing_http</string>
<string name="pref_title_debug_missing_http" translatable="false">Missing-Http Intent</string>
</resources>
24 changes: 8 additions & 16 deletions app/src/main/res/xml/pref_debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,38 @@
<PreferenceCategory
android:order="1000"
android:key="@string/pref_key_category_debug"
android:title="@string/pref_title_category_debug">
android:title="Debug">

<Preference
android:key="@string/pref_key_debug_amazon"
android:title="@string/pref_title_debug_amazon"
android:title="Amazon Intent"
android:summary="http://www.amazon.com/Garmin-Speed-Cadence-Bike-Sensor/dp/B000BFNOT8"/>

<Preference
android:key="@string/pref_key_debug_maps"
android:title="@string/pref_title_debug_maps"
android:title="Maps Intent"
android:summary="http://maps.google.com/maps"/>

<Preference
android:key="@string/pref_key_debug_instagram"
android:title="@string/pref_title_debug_instagram"
android:title="Instagram Intent"
android:summary="https://www.instagram.com/tasomaniac/"/>

<Preference
android:key="@string/pref_key_debug_play"
android:title="@string/pref_title_debug_play"
android:title="Play Store Intent"
android:summary="https://play.google.com/store/apps/details?id=com.tasomaniac.openwith"/>

<Preference
android:key="@string/pref_key_debug_redirect"
android:title="@string/pref_title_debug_redirect"
android:title="Url with redirect"
android:summary="http://forward.immobilienscout24.de/9004STF/expose/78069302"/>

<Preference
android:key="pref_key_debug_washington_post"
android:title="Washington Post"
android:summary="https://www.washingtonpost.com/nation/2021/12/30/colorado-grass-fire/"/>

<Preference
android:key="@string/pref_key_debug_non_http"
android:title="@string/pref_title_debug_non_http"
android:title="Non-Http url"
android:summary="is24://retargetShowSearchForm"/>

<Preference
android:key="@string/pref_key_debug_missing_http"
android:title="@string/pref_title_debug_missing_http"
android:title="Missing-Http Intent"
android:summary="www.google.com"/>

</PreferenceCategory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class DefaultResolverPresenterTest {

then(navigation).should().startPreferred(intent, label)
then(navigation).should().dismiss()
then(view).shouldHaveZeroInteractions()
then(view).shouldHaveNoInteractions()
}

@Test
Expand All @@ -105,7 +105,7 @@ class DefaultResolverPresenterTest {

then(navigation).should().startPreferred(intent, label)
then(navigation).should().dismiss()
then(view).shouldHaveZeroInteractions()
then(view).shouldHaveNoInteractions()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HomeScreenResolverPresenterTest {
)
)

then(filteredItem).shouldHaveZeroInteractions()
then(filteredItem).shouldHaveNoInteractions()
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.40.0'
classpath 'com.novoda:gradle-build-properties-plugin:0.4.1'
Expand Down

0 comments on commit 462b99f

Please sign in to comment.