Showing 472 of 2,519 total issues
LogUtil
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
public class LogUtil {
private static final String TAG = "weex";
public static void e(String format, Object... args) {
e(format(format, args));
File we-dropdown.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
Function 0
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ function(module, exports, __webpack_require__) {
;__weex_define__("@weex-component/7731ee0d1017fad0adf656990885c808", [], function(__weex_require__, __weex_exports__, __weex_module__){
__webpack_require__(18);
__webpack_require__(19);
Method testAherf
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public void testAherf(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_AHref")){
Log.e(TAG, "TC_AHref find");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function 17
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
/***/ function(module, exports) {
;__weex_define__("@weex-component/we-dropdown", [], function(__weex_require__, __weex_exports__, __weex_module__){
;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method testTextStyleRow
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void testTextStyleRow(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Text")){
Log.e(TAG, "TC_Text find");
Method setElementChildren
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void setElementChildren(Object element, List<Object> children) {
// If we receive redundant information, then nothing needs to be done.
ElementInfo changesElementInfo = mElementToInfoChangesMap.get(element);
if (changesElementInfo != null &&
ListUtil.identityEquals(children, changesElementInfo.children)) {
WeexUiTestCaseTcImageUpdate
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class WeexUiTestCaseTcImageUpdate extends ActivityInstrumentationTestCase2<WXPageActivity> {
public final String TAG = "TestScript_Guide==";
public WXPageActivity waTestPageActivity;
public WeappJsBaseTestCase weappApplication;
AbstractChainedDescriptor
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractChainedDescriptor<E> extends Descriptor implements ChainedDescriptor {
private Descriptor mSuper;
public void setSuper(Descriptor superDescriptor) {
ViewDescriptor
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
final class ViewDescriptor extends AbstractChainedDescriptor<View> implements HighlightableDescriptor {
private static final String ID_NAME = "id";
private static final String NONE_VALUE = "(none)";
private static final String NONE_MAPPING = "<no mapping>";
Page
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class Page implements ChromeDevtoolsDomain {
private final Context mContext;
private final ObjectMapper mObjectMapper = new ObjectMapper();
@Nullable
File minesweeper.js
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
Method connect
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void connect(String url) {
if (mSocketClient != null) {
throw new IllegalStateException("OkHttp3SocketClient is already initialized.");
}
try {
Method getExistedModules
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static Map<String, TypeModuleFactory> getExistedModules(boolean global) {
Map<String, TypeModuleFactory> modules = new HashMap<>();
if (global) {
try {
Field sGlobalField = WXModuleManager.class.getDeclaredField("sGlobalModuleMap");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method collectNativeTracingData
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private void collectNativeTracingData(WXTracing.TraceEvent head, JSONArray out) {
if (head.subEvents != null) {
for (int i = 0; i < head.subEvents.size(); i++) {
WXTracing.TraceEvent subEvent = head.subEvents.valueAt(i);
if (subEvent.isSegment) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getViewProperties
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private List<ViewCSSProperty> getViewProperties() {
if (mViewProperties == null) {
synchronized (this) {
if (mViewProperties == null) {
List<ViewCSSProperty> props = new ArrayList<>();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method hitTestImpl
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private static View hitTestImpl(
View view,
float x,
float y,
@Nullable Predicate<View> viewSelector,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method testColorUpdateType
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void testColorUpdateType(){
for(final View caseView : mCaseListIndexView){
if (((WXTextView)caseView).getText().toString().equals("TC_Color")){
Log.e(TAG, "TC_Color find");
Method onBindViewHolder
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void onBindViewHolder(final ItemHolder holder, int position) {
final WXTracing.TraceEvent event = rootEvent.subEvents.valueAt(position);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
Method connect
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void connect(String url) {
if (mSocketClient != null) {
throw new IllegalStateException("OkHttpSocketClient is already initialized.");
}
try {