-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Compiler Warnings as Errors - WordPress Module #17181
Copy link
Copy link
Closed
Description
Parent #17173
This issue is about resolving/suppressing the compile warnings for the WordPress app module.
Number of Warnings: 621
- Main Source: 481
- Debug Source: 2
- WordPress Source: 5
- Jetpack Source: 4
- Test Source: 128
- UI Test Source: 1
- Resolve/Suppress all warnings.
- Main Source (
481) @ParaskP7- Resolve/Suppress
Coroutinesrelated warnings (6). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Coroutines Warnings #17210- This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)' (
3) - 'XYZ' is deprecated. Implement CoroutineScope interface and cancel all child coroutines in xyz (
2) - @synchronized annotation is not applicable to suspend functions and lambdas (
1) (with comment, cc @malinajirka)
- This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)' (
- Resolve/Suppress
Deprecatedrelated warnings (365). @ParaskP7- Specific
PreferenceManagerrelated warnings. @ParaskP7 [Compile Warnings As Errors] WordPress Module - ResolvePreferenceManagerDeprecated Warnings #17215LifecycleEventrelated warnings. @ParaskP7 [Compile Warnings As Errors] WordPress Module - ResolveLifecycleEventDeprecated Warnings #17223
- Generic
- 'XYX' is deprecated. Deprecated in Java (
247minusSpecificabove) @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.1 #17246 - 'Xyz' is deprecated. Overrides deprecated member in 'xyz'. Deprecated in Java (
5) @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.2 #17287 - 'xyz' is deprecated. Use xyz instead. (
24) @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.2 #17287 - 'Xyz' is deprecated. This should be removed once we start receiving Xyz the source block from the backend (
2) @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.2 #17287 - 'Xyz' is deprecated. This class is being refactored, if you implement any change, please also update xyz (
87) @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.2 #17287
- 'XYX' is deprecated. Deprecated in Java (
- Specific
- Resolve/Suppress
Type/Cast/Whenrelated warnings (75). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Type/Cast/When Warnings #17291- Type (
44)- Unsafe use of a nullable receiver of type Xyz? (
4) - Type mismatch: inferred type is Xyz? but Xyz was expected (
13) - Elvis operator (?:) always returns the left operand of non-nullable type Xyz (
4) - The corresponding parameter in the supertype 'Xyz' is named 'xyz'. This may cause problems when calling this function with named arguments. (
4) - Unnecessary non-null assertion (!!) on a non-null receiver of type Xyz (
1) - Unnecessary safe call on a non-null receiver of type Xyz. This expression will have nullable type in future releases (
18)
- Unsafe use of a nullable receiver of type Xyz? (
- Cast (
5)- Unchecked cast: Xyz to Xyz (
4) - This cast can never succeed (
1)
- Unchecked cast: Xyz to Xyz (
- When (
26)- Non exhaustive 'when' statements on xyz will be prohibited in 1.7, add 'Xyz', 'Xyz' branch(es) or 'else' branch instead (
26)
- Non exhaustive 'when' statements on xyz will be prohibited in 1.7, add 'Xyz', 'Xyz' branch(es) or 'else' branch instead (
- Type (
- Resolve/Suppress
Otherrelated warnings (35). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Other Warnings #17293- This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API. (
1) - Parameter 'xyz' is never used (
17) - Parameter 'xyz' is never used, could be renamed to _ (
9) - Name shadowed: xyz (
2) - Parcelize annotations from package 'kotlinx.android.parcel' are deprecated. Change package to 'kotlinx.parcelize' (
1) - Variable 'xyz' initializer is redundant (
1) - There is more than one label with such a name in this scope (
1) - Condition 'xyz' is always 'xyz' (
2) - Unreachable code (
1)
- This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API. (
- Resolve/Suppress
- Debug/WordPress/Jetpack Source (
11) @ParaskP7- Resolve/Suppress
Deprecatedrelated warnings (11). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Deprecated Warnings - Part.2 #17287- 'Xyz' is deprecated. Deprecated in Java (
11)
- 'Xyz' is deprecated. Deprecated in Java (
- Resolve/Suppress
- Test/UI Test Source (
129) @ParaskP7- Resolve/Suppress
Coroutinesrelated warnings (11). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Coroutines Warnings #17210- This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)' (
8) - 'Xyz' is deprecated. Deprecated in the favour of 'xyz'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation (
3)
- This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)' (
- Resolve/Suppress
Deprecatedrelated warnings (80). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Test Warnings #17300- 'XYX' is deprecated. Deprecated in Java (
58) - 'xyz' is deprecated. Use xyz instead. (
2) - 'Xyz' is deprecated. This class is being refactored, if you implement any change, please also update xyz (
20)
- 'XYX' is deprecated. Deprecated in Java (
- Resolve/Suppress
Type/Cast/Whenrelated warnings (15). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Test Warnings #17300- Type (
8)- Type mismatch: inferred type is Xyz? but Xyz was expected (
3) - Unnecessary non-null assertion (!!) on a non-null receiver of type Xyz (
4) - Unnecessary safe call on a non-null receiver of type Xyz. This expression will have nullable type in future releases (
1)
- Type mismatch: inferred type is Xyz? but Xyz was expected (
- Cast (
6)- Unchecked cast: Xyz to Xyz (
4) - This cast can never succeed (
2)
- Unchecked cast: Xyz to Xyz (
- When (
1)- Non exhaustive 'when' statements on xyz will be prohibited in 1.7, add 'Xyz', 'Xyz' branch(es) or 'else' branch instead (
1)
- Non exhaustive 'when' statements on xyz will be prohibited in 1.7, add 'Xyz', 'Xyz' branch(es) or 'else' branch instead (
- Type (
- Resolve/Suppress
Other/Test/UI Testrelated warnings (23). @ParaskP7 [Compile Warnings As Errors] WordPress Module - Resolve Test Warnings #17300- Other (
5)- Parameter 'xyz' is never used (
5)
- Parameter 'xyz' is never used (
- Test (
17)- Check for instance is always 'xyz' (
2) - Name contains characters which can cause problems on Windows: " (
15)
- Check for instance is always 'xyz' (
- UI Test (
1)- Name shadowed: fileName (
1)
- Name shadowed: fileName (
- Other (
- Resolve/Suppress
- Main Source (
- Enable all warnings as errors flag. @ParaskP7 [Compile Warnings As Errors] All Modules - Enable All Warnings as Errors #17318
Reactions are currently unavailable