Skip to content
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

Fix detekt failures and rename tests #1386

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ jobs:
env:
GOOGLE_SERVICES: ${{ steps.op-secrets.outputs.GOOGLE_SERVICES }}

- id: gradle
- id: gradle-build
run: ./gradlew build --console=plain

- run: ./gradlew detektAll --continue --console=plain

- id: screenshot-validation
run: ./gradlew validateScreenshotTest --console=plain

Expand All @@ -70,7 +72,7 @@ jobs:
path: "**/build/reports/screenshotTest/preview/debug"

- uses: thollander/actions-comment-pull-request@v3
if: ${{ steps.gradle.outputs.build-scan-url }}
if: ${{ steps.gradle-build.outputs.build-scan-url }}
with:
message: "Build scan published to ${{ steps.gradle.outputs.build-scan-url }}"
comment-tag: build-scan-url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import androidx.compose.runtime.Composable
import io.ashdavies.party.tooling.MaterialPreviewTheme
import io.ashdavies.party.tooling.PreviewDayNight

internal class EventsDetailTest {
internal class EventsDetailTests {

@Composable
@PreviewDayNight
fun EventsDetailPreview() {
private fun EventsDetailPreview() {
MaterialPreviewTheme {
EventsDetail(DroidconBerlin)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import kotlinx.coroutines.flow.flowOf

private val DroidconEvents = listOf(AndroidMakers, DroidconBerlin, DroidconLondon)

internal class EventsListTest {
internal class EventsListTests {

@Composable
@PreviewDayNight
fun EventsListPreview(data: List<Event> = DroidconEvents) {
private fun EventsListPreview(data: List<Event> = DroidconEvents) {
MaterialPreviewTheme {
EventsList(
state = EventsScreen.State(lazyPagingItems(flowOf(PagingData.from(data)))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import io.ashdavies.party.tooling.MaterialPreviewTheme
import io.ashdavies.party.tooling.PreviewDayNight
import kotlinx.collections.immutable.persistentListOf

internal class GalleryListTest {
internal class GalleryScreenTests {

@Composable
@PreviewDayNight
@OptIn(ExperimentalFoundationApi::class)
fun GalleryGridPreview() {
private fun GalleryGridPreview() {
MaterialPreviewTheme {
GalleryGrid(
itemList = persistentListOf(
Expand All @@ -29,7 +29,7 @@ internal class GalleryListTest {

@Composable
@PreviewDayNight
fun GalleryBottomSheetPreview() {
private fun GalleryBottomSheetPreview() {
MaterialPreviewTheme {
GallerySheetContent(eventSink = { })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class HomeScreenTests {
@Composable
@PreviewDayNight
@OptIn(ExperimentalMaterial3Api::class)
fun HomeTopAppBarPreview() {
private fun HomeTopAppBarPreview() {
MaterialPreviewTheme {
HomeTopBar(
actions = {
Expand All @@ -27,7 +27,7 @@ internal class HomeScreenTests {

@Composable
@PreviewDayNight
fun HomeBottomSheetPreview() {
private fun HomeBottomSheetPreview() {
MaterialPreviewTheme {
HomeBottomBar()
}
Expand Down
2 changes: 2 additions & 0 deletions detekt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ naming:
style:
MagicNumber:
ignorePropertyDeclaration: true
UnusedPrivateMember:
ignoreAnnotated: ['Preview', 'PreviewDayNight']
UnusedPrivateProperty:
excludes:
- '**/*.gradle.kts'
Loading