Skip to content

Fix lint, detekt, and checkstyle issues from reader modularization

73d319e
Select commit
Loading
Failed to load commit list.
Draft

Extract :libs:core-ui module from :WordPress #22759

Fix lint, detekt, and checkstyle issues from reader modularization
73d319e
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 3, 2026 in 2m 42s

Quality Gate failed

Failed conditions
2 Security Hotspots
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 134 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderDatabase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this dangerous instance of double-checked locking.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FSxhtHiJuRVnHdB&open=AZ1P7FSxhtHiJuRVnHdB&pullRequest=22759

Check failure on line 227 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderDatabase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

End this switch case with an unconditional break, return or throw statement.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FSxhtHiJuRVnHdS&open=AZ1P7FSxhtHiJuRVnHdS&pullRequest=22759

Check warning on line 30 in WordPress/src/main/java/org/wordpress/android/ui/reader/tracker/ReaderTrackerImpl.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this TODO comment.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7En7htHiJuRVnHbp&open=AZ1P7En7htHiJuRVnHbp&pullRequest=22759

Check failure on line 26 in libs/core-ui/src/main/java/org/wordpress/android/widgets/WPViewPager2Transformer.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 21 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FHGhtHiJuRVnHcU&open=AZ1P7FHGhtHiJuRVnHcU&pullRequest=22759

Check warning on line 40 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a private constructor to hide the implicit public one.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FL-htHiJuRVnHck&open=AZ1P7FL-htHiJuRVnHck&pullRequest=22759

Check warning on line 369 in libs/utils/src/main/java/org/wordpress/android/util/LiveDataUtils.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 12 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7E5ChtHiJuRVnHb4&open=AZ1P7E5ChtHiJuRVnHb4&pullRequest=22759

Check failure on line 82 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderPost.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 25 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FVDhtHiJuRVnHeK&open=AZ1P7FVDhtHiJuRVnHeK&pullRequest=22759

Check warning on line 20 in libs/reader/src/main/java/org/wordpress/android/ui/reader/utils/FeaturedImageUtils.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Deprecated code should not be used.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FBkhtHiJuRVnHcH&open=AZ1P7FBkhtHiJuRVnHcH&pullRequest=22759

Check warning on line 70 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderPost.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make organizationId a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FVDhtHiJuRVnHeD&open=AZ1P7FVDhtHiJuRVnHeD&pullRequest=22759

Check warning on line 24 in libs/reader/src/main/java/org/wordpress/android/ui/reader/comments/ThreadedCommentsActionSource.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace "equals" with binary operator "==".

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FDihtHiJuRVnHcO&open=AZ1P7FDihtHiJuRVnHcO&pullRequest=22759

Check failure on line 969 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderPostTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal " LIMIT " 6 times.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FL-htHiJuRVnHci&open=AZ1P7FL-htHiJuRVnHci&pullRequest=22759

Check warning on line 12 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderUser.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make blogId a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FUGhtHiJuRVnHdk&open=AZ1P7FUGhtHiJuRVnHdk&pullRequest=22759

Check warning on line 12 in libs/utils/src/main/java/org/wordpress/android/util/WPPrefUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a private constructor to hide the implicit public one.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7E1thtHiJuRVnHbz&open=AZ1P7E1thtHiJuRVnHbz&pullRequest=22759

Check warning on line 142 in libs/reader-models/src/main/java/org/wordpress/android/ui/reader/utils/ReaderSlugUtils.kt

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Merge chained "if" statements into a single "when" statement.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FVYhtHiJuRVnHea&open=AZ1P7FVYhtHiJuRVnHea&pullRequest=22759

Check warning on line 52 in libs/core-ui/src/main/java/org/wordpress/android/widgets/HeaderGridView.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make view a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FIghtHiJuRVnHcW&open=AZ1P7FIghtHiJuRVnHcW&pullRequest=22759

Check warning on line 15 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderBlog.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make isJetpack a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FT7htHiJuRVnHdc&open=AZ1P7FT7htHiJuRVnHdc&pullRequest=22759

Check warning on line 579 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderPost.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "transient" modifier from this field.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FVDhtHiJuRVnHeG&open=AZ1P7FVDhtHiJuRVnHeG&pullRequest=22759

Check warning on line 19 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderCommentTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a private constructor to hide the implicit public one.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FRehtHiJuRVnHc3&open=AZ1P7FRehtHiJuRVnHc3&pullRequest=22759

Check failure on line 230 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderDatabase.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

End this switch case with an unconditional break, return or throw statement.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FSxhtHiJuRVnHdR&open=AZ1P7FSxhtHiJuRVnHdR&pullRequest=22759

Check warning on line 77 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderTagTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isEmpty() to check whether the collection is empty or not.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FRJhtHiJuRVnHcu&open=AZ1P7FRJhtHiJuRVnHcu&pullRequest=22759

Check warning on line 11 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderUser.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make userId a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FUGhtHiJuRVnHdj&open=AZ1P7FUGhtHiJuRVnHdj&pullRequest=22759

Check warning on line 77 in libs/reader-models/src/main/java/org/wordpress/android/models/ReaderPost.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make xpostBlogId a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FVDhtHiJuRVnHeF&open=AZ1P7FVDhtHiJuRVnHeF&pullRequest=22759

Check warning on line 15 in libs/reader/src/main/java/org/wordpress/android/ui/reader/ReaderPostHistory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the synchronized class "Stack" by an unsynchronized one such as "Deque".

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FDChtHiJuRVnHcJ&open=AZ1P7FDChtHiJuRVnHcJ&pullRequest=22759

Check warning on line 18 in libs/reader-models/src/main/java/org/wordpress/android/datasets/ReaderUserTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a private constructor to hide the implicit public one.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FRThtHiJuRVnHcy&open=AZ1P7FRThtHiJuRVnHcy&pullRequest=22759

Check warning on line 31 in libs/core-ui/src/main/java/org/wordpress/android/widgets/CheckedLinearLayout.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the unnecessary boolean literal.

See more on https://sonarcloud.io/project/issues?id=wordpress-mobile_WordPress-Android&issues=AZ1P7FIThtHiJuRVnHcV&open=AZ1P7FIThtHiJuRVnHcV&pullRequest=22759