Skip to content

Commit 57ab46a

Browse files
committed
Analysis: Move long method warnings from baseline and close to source
This was done because those warnings are line based and since these files got updated from previous commits they are now complaining again. Thus, removing them from the baseline and moving them explicitly, inline/close to source makes it so that this problem will never happen again for those specific cases.
1 parent 57cfec8 commit 57ab46a

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/sections/granular/usecases/OverviewMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class OverviewMapper @Inject constructor(
142142
)
143143
}
144144

145-
@Suppress("LongParameterList")
145+
@Suppress("LongParameterList", "LongMethod")
146146
fun buildChart(
147147
dates: List<PeriodData>,
148148
statsGranularity: StatsGranularity,

WordPress/src/main/java/org/wordpress/android/viewmodel/posts/PostListItemUiStateHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class PostListItemUiStateHelper @Inject constructor(
7272
private val uploadUiStateUseCase: PostModelUploadUiStateUseCase,
7373
private val labelColorUseCase: PostPageListLabelColorUseCase
7474
) {
75-
@Suppress("LongParameterList")
75+
@Suppress("LongParameterList", "LongMethod")
7676
fun createPostListItemUiState(
7777
authorFilterSelection: AuthorFilterSelection,
7878
post: PostModel,

config/detekt/baseline.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@
7878
<ID>LongMethod:MediaPickerActivity.kt$MediaPickerActivity$override fun onActivityResult( requestCode: Int, resultCode: Int, data: Intent? )</ID>
7979
<ID>LongMethod:MediaPickerFragment.kt$MediaPickerFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
8080
<ID>LongMethod:MediaPickerViewModel.kt$MediaPickerViewModel$private fun buildUiModel( domainModel: DomainModel?, selectedIds: List&lt;Identifier>?, softAskRequest: SoftAskRequest?, isSearching: Boolean? ): PhotoListUiModel</ID>
81-
<ID>LongMethod:OverviewMapper.kt$OverviewMapper$fun buildChart( dates: List&lt;PeriodData>, statsGranularity: StatsGranularity, onBarSelected: (String?) -> Unit, onBarChartDrawn: (visibleBarCount: Int) -> Unit, selectedType: Int, selectedItemPeriod: String ): List&lt;BlockListItem></ID>
8281
<ID>LongMethod:PhotoPickerFragment.kt$PhotoPickerFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
83-
<ID>LongMethod:PostListItemUiStateHelper.kt$PostListItemUiStateHelper$fun createPostListItemUiState( authorFilterSelection: AuthorFilterSelection, post: PostModel, site: SiteModel, unhandledConflicts: Boolean, hasAutoSave: Boolean, capabilitiesToPublish: Boolean, statsSupported: Boolean, featuredImageUrl: String?, formattedDate: String, performingCriticalAction: Boolean, isSearch: Boolean, uploadStatusTracker: PostModelUploadStatusTracker, onAction: (PostModel, PostListButtonType, AnalyticsTracker.Stat) -> Unit ): PostListItemUiState</ID>
8482
<ID>LongMethod:PrepublishingHomeViewModel.kt$PrepublishingHomeViewModel$private fun setupHomeUiState( editPostRepository: EditPostRepository, site: SiteModel, isStoryPost: Boolean )</ID>
8583
<ID>LongMethod:PublishSettingsFragment.kt$PublishSettingsFragment$override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?</ID>
8684
<ID>LongMethod:ReferrersUseCase.kt$ReferrersUseCase$override fun buildUiModel(domainModel: ReferrersModel, uiState: SelectedGroup): List&lt;BlockListItem></ID>

0 commit comments

Comments
 (0)