weexteam/weex_devtools_android

View on GitHub

Showing 2,519 of 2,519 total issues

File DOM.java has 663 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2014-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Input;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Input/WeexUiTestCaseTcInputType.java on lines 1..204

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 714.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Input;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Input/WeexUiTestCaseTcInputStyle.java on lines 1..204

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 714.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeAppVTrue.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeDevMTrue.java on lines 1..193
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeOSVTrue.java on lines 1..194

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 680.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeAppVTrue.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeDevMTrue.java on lines 1..193
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeWeexVTrue.java on lines 1..192

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 680.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeAppVTrue.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeOSVTrue.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeWeexVTrue.java on lines 1..192

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 680.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeDevMTrue.java on lines 1..193
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeOSVTrue.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeWeexVTrue.java on lines 1..192

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 680.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeDevMFalse.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeWeexVFalse.java on lines 1..193

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 676.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeOSVFalse.java on lines 1..193
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeWeexVFalse.java on lines 1..193

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 676.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    package com.alibaba.weex.uitest.TC_Downgrade;
    
    import android.app.Activity;
    import android.app.Application;
    import android.app.Instrumentation;
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeDevMFalse.java on lines 1..194
    playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Downgrade/WeexUiTestCaseTcDowngradeOSVFalse.java on lines 1..193

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 676.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function 17 has 266 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    /***/ function(module, exports) {
    
        ;__weex_define__("@weex-component/we-dropdown", [], function(__weex_require__, __weex_exports__, __weex_module__){
    
        ;
    Severity: Major
    Found in playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js - About 1 day to fix

      Method testImageUpdate has 264 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public void testImageUpdate(){
      
              for(final View caseView : mCaseListIndexView){
                 if (((WXTextView)caseView).getText().toString().equals("TC_Image")){
                     Log.e(TAG, "TC_Image find");

        File Document.java has 598 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright (c) 2014-present, Facebook, Inc.
         * All rights reserved.
         *
         * This source code is licensed under the BSD-style license found in the

          Function data has 256 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  data: function () {return {
                    backgroundColor: 'red',
                    composite: 'false',
                    shopList: [
                      {
          Severity: Major
          Found in playground/app/src/main/assets/component/list/list-demo-horizon.js - About 1 day to fix

            WXDebugBridge has 68 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class WXDebugBridge implements IWXBridge {
            
                private static final String TAG = "WXDebugBridge";
                private static volatile WXDebugBridge sInstance;
                private final Object mLock = new Object();

              Method traverse has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
              Open

                @Nullable
                public HealthReport traverse() {
                  long start = System.currentTimeMillis();
                  if (Looper.getMainLooper() == Looper.myLooper()) {
                    WXLogUtils.e(TAG, "illegal thread...");

              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

              XmlUtils has 60 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public class XmlUtils {
              
                  public static void skipCurrentTag(XmlPullParser parser)
                      throws XmlPullParserException, IOException {
                      int outerDepth = parser.getDepth();

                Method testElementOpt has 212 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public void testElementOpt() {
                
                        for (final View caseView : mCaseListIndexView) {
                            if (((WXTextView) caseView).getText().toString().equals("TC_Event")) {
                                Log.e(TAG, "TC_Event find");

                  Function 0 has 206 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  /***/ function(module, exports, __webpack_require__) {
                  
                      ;__weex_define__("@weex-component/89d20f2b69944aec95a233f12eadd0e7", [], function(__weex_require__, __weex_exports__, __weex_module__){
                  
                  
                  
                  Severity: Major
                  Found in playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js - About 1 day to fix

                    File WXDebugBridge.java has 477 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    package com.taobao.weex.devtools.debug;
                    
                    import android.text.TextUtils;
                    import android.util.Log;
                    
                    
                      Severity
                      Category
                      Status
                      Source
                      Language