|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * This is an automatically generated baseline for Phan issues. |
| 4 | + * When Phan is invoked with --load-baseline=path/to/baseline.php, |
| 5 | + * The pre-existing issues listed in this file won't be emitted. |
| 6 | + * |
| 7 | + * This file can be updated by invoking Phan with --save-baseline=path/to/baseline.php |
| 8 | + * (can be combined with --load-baseline) |
| 9 | + */ |
| 10 | +return [ |
| 11 | + // # Issue statistics: |
| 12 | + // PhanPluginSimplifyExpressionBool : 80+ occurrences |
| 13 | + // PhanUndeclaredGlobalVariable : 45+ occurrences |
| 14 | + // PhanPossiblyUndeclaredVariable : 20+ occurrences |
| 15 | + // PhanUndeclaredVariable : 20+ occurrences |
| 16 | + // PhanTypeMismatchArgument : 10+ occurrences |
| 17 | + // PhanTypeMismatchArgumentNullableInternal : 10+ occurrences |
| 18 | + // PhanTypeMismatchReturn : 10+ occurrences |
| 19 | + // PhanTypeNonVarPassByRef : 10+ occurrences |
| 20 | + // PhanTypePossiblyInvalidDimOffset : 10+ occurrences |
| 21 | + // PhanUndeclaredFunctionInCallable : 10+ occurrences |
| 22 | + // PhanTypeMismatchArgumentProbablyReal : 9 occurrences |
| 23 | + // PhanUndeclaredFunction : 8 occurrences |
| 24 | + // PhanSuspiciousValueComparison : 6 occurrences |
| 25 | + // PhanTypeArraySuspiciousNull : 6 occurrences |
| 26 | + // PhanTypeInvalidDimOffset : 6 occurrences |
| 27 | + // PhanUndeclaredVariableDim : 6 occurrences |
| 28 | + // PhanTypeArraySuspiciousNullable : 5 occurrences |
| 29 | + // PhanTypeMismatchArgumentInternalProbablyReal : 4 occurrences |
| 30 | + // PhanTypeMismatchArgumentInternalReal : 4 occurrences |
| 31 | + // PhanPluginDuplicateConditionalNullCoalescing : 3 occurrences |
| 32 | + // PhanTypeInvalidLeftOperandOfNumericOp : 3 occurrences |
| 33 | + // PhanTypeSuspiciousNonTraversableForeach : 3 occurrences |
| 34 | + // PhanUndeclaredClassMethod : 3 occurrences |
| 35 | + // PhanPluginDuplicateAdjacentStatement : 2 occurrences |
| 36 | + // PhanPluginDuplicateExpressionAssignmentOperation : 2 occurrences |
| 37 | + // PhanPluginNeverReturnFunction : 2 occurrences |
| 38 | + // PhanPluginUnreachableCode : 2 occurrences |
| 39 | + // PhanPossiblyUndeclaredGlobalVariable : 2 occurrences |
| 40 | + // PhanTypeMismatchArgumentNullable : 2 occurrences |
| 41 | + // PhanTypeSuspiciousStringExpression : 2 occurrences |
| 42 | + // PhanCommentParamWithoutRealParam : 1 occurrence |
| 43 | + // PhanTypeConversionFromArray : 1 occurrence |
| 44 | + // PhanTypeInvalidLeftOperandOfBitwiseOp : 1 occurrence |
| 45 | + // PhanTypeInvalidRightOperandOfAdd : 1 occurrence |
| 46 | + // PhanTypeInvalidRightOperandOfBitwiseOp : 1 occurrence |
| 47 | + // PhanTypeMismatchArgumentInternal : 1 occurrence |
| 48 | + // PhanTypeMismatchDimAssignment : 1 occurrence |
| 49 | + // PhanTypeMismatchProperty : 1 occurrence |
| 50 | + // PhanTypeMissingReturn : 1 occurrence |
| 51 | + // PhanUndeclaredConstant : 1 occurrence |
| 52 | + |
| 53 | + // Currently, file_suppressions and directory_suppressions are the only supported suppressions |
| 54 | + 'file_suppressions' => [ |
| 55 | + 'advanced-cache.php' => ['PhanPluginSimplifyExpressionBool'], |
| 56 | + 'inc/delete-cache-button.php' => ['PhanPluginNeverReturnFunction', 'PhanTypeMismatchArgument'], |
| 57 | + 'ossdl-cdn.php' => ['PhanUndeclaredClassMethod'], |
| 58 | + 'partials/advanced.php' => ['PhanPluginSimplifyExpressionBool', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeNonVarPassByRef', 'PhanUndeclaredGlobalVariable'], |
| 59 | + 'partials/debug.php' => ['PhanTypeNonVarPassByRef', 'PhanUndeclaredGlobalVariable'], |
| 60 | + 'partials/easy.php' => ['PhanPluginSimplifyExpressionBool', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentInternalReal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredConstant', 'PhanUndeclaredGlobalVariable'], |
| 61 | + 'partials/lockdown.php' => ['PhanUndeclaredGlobalVariable'], |
| 62 | + 'partials/preload.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanPluginSimplifyExpressionBool', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimAssignment', 'PhanUndeclaredGlobalVariable'], |
| 63 | + 'partials/tracking_parameters.php' => ['PhanUndeclaredGlobalVariable'], |
| 64 | + 'plugins/domain-mapping.php' => ['PhanUndeclaredFunction'], |
| 65 | + 'plugins/jetpack.php' => ['PhanPluginSimplifyExpressionBool'], |
| 66 | + 'plugins/wptouch.php' => ['PhanPluginSimplifyExpressionBool', 'PhanUndeclaredFunction'], |
| 67 | + 'rest/class.wp-super-cache-rest-get-cache.php' => ['PhanPluginSimplifyExpressionBool'], |
| 68 | + 'rest/class.wp-super-cache-rest-get-settings.php' => ['PhanPluginSimplifyExpressionBool', 'PhanSuspiciousValueComparison', 'PhanTypeMismatchReturn', 'PhanUndeclaredFunctionInCallable', 'PhanUndeclaredVariable'], |
| 69 | + 'rest/class.wp-super-cache-rest-get-status.php' => ['PhanPluginSimplifyExpressionBool', 'PhanSuspiciousValueComparison', 'PhanTypeNonVarPassByRef', 'PhanUndeclaredVariable'], |
| 70 | + 'rest/class.wp-super-cache-rest-test-cache.php' => ['PhanPluginSimplifyExpressionBool', 'PhanTypeConversionFromArray', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredVariableDim'], |
| 71 | + 'rest/class.wp-super-cache-rest-update-settings.php' => ['PhanCommentParamWithoutRealParam', 'PhanPluginSimplifyExpressionBool', 'PhanTypeMissingReturn'], |
| 72 | + 'src/device-detection/class-user-agent-info.php' => ['PhanPluginSimplifyExpressionBool', 'PhanTypeMismatchProperty', 'PhanTypeMismatchReturn'], |
| 73 | + 'tests/e2e/tools/mu-test-helpers.php' => ['PhanTypeMismatchArgument'], |
| 74 | + 'wp-cache-base.php' => ['PhanTypeMismatchArgumentNullableInternal'], |
| 75 | + 'wp-cache-phase1.php' => ['PhanTypeNonVarPassByRef'], |
| 76 | + 'wp-cache-phase2.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginSimplifyExpressionBool', 'PhanPluginUnreachableCode', 'PhanPossiblyUndeclaredVariable', 'PhanSuspiciousValueComparison', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternalProbablyReal', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeNonVarPassByRef', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredVariableDim'], |
| 77 | + 'wp-cache.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginNeverReturnFunction', 'PhanPluginSimplifyExpressionBool', 'PhanPossiblyUndeclaredVariable', 'PhanSuspiciousValueComparison', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfBitwiseOp', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeInvalidRightOperandOfAdd', 'PhanTypeInvalidRightOperandOfBitwiseOp', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentInternalProbablyReal', 'PhanTypeMismatchArgumentInternalReal', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeNonVarPassByRef', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredFunction', 'PhanUndeclaredVariable', 'PhanUndeclaredVariableDim'], |
| 78 | + ], |
| 79 | + // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. |
| 80 | + // (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases) |
| 81 | +]; |
0 commit comments