weexteam/weex_devtools_android

View on GitHub

Showing 472 of 2,519 total issues

Function 0 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

/***/ function(module, exports, __webpack_require__) {

    ;__weex_define__("@weex-component/6be669a40db0f3641576862213ed29fa", [], function(__weex_require__, __weex_exports__, __weex_module__){
    __webpack_require__(18);

Severity: Minor
Found in playground/app/src/main/assets/showcase/new-fashion/banners.js - About 45 mins to fix

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 valueToString has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  public static String valueToString(Object value) {
    if (value != null) {
      if (value instanceof Set) {
        JSONArray array = new JSONArray();
        for (String entry : (Set<String>)value) {

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 callUpdateStyle has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public int callUpdateStyle(String instanceId, String ref, HashMap<String, Object> styles, HashMap<String, String> paddings, HashMap<String, String> margins, HashMap<String, String> borders) {

    Function 0 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    /***/ function(module, exports, __webpack_require__) {
    
        ;__weex_define__("@weex-component/41f507967dfcd1999e9ffa0a3af0549a", [], function(__weex_require__, __weex_exports__, __weex_module__){
        __webpack_require__(18);
    
    
    Severity: Minor
    Found in playground/app/src/main/assets/showcase/new-fashion/goods.js - About 45 mins to fix

    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 onChildNodeInserted has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            DocumentView view,
            Object element,
            int parentNodeId,
            int previousNodeId,
            Accumulator<Object> insertedItems) {

      Method getStyleFromValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            View element,
            String name,
            Object value,
            @Nullable ViewDebug.ExportedProperty annotation,
            StyleAccumulator styles) {

        Method findMatches has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          private void findMatches(Object element, int x, int y, Accumulator<Integer> matchedIds, Boolean found) {

          Method onChildNodeInserted has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  DocumentView view,
                  Object element,
                  int parentNodeId,
                  int previousNodeId,
                  Accumulator<Object> insertedItems);

            Method getStylesFromObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  View view,
                  String name,
                  Object value,
                  @Nullable ViewDebug.ExportedProperty annotation,
                  StyleAccumulator styles) {

              Method hitTestImpl has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    View view,
                    float x,
                    float y,
                    @Nullable Predicate<View> viewSelector,
                    boolean allowViewGroupResult) {

                Method isTransformedPointInView has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      ViewGroup parent,
                      View child,
                      float x,
                      float y,
                      @Nullable PointF outLocalPoint) {

                  Method interpretResponseStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        String requestId,
                        @Nullable String contentType,
                        @Nullable String contentEncoding,
                        @Nullable InputStream availableInputStream,
                        ResponseHandler responseHandler) {

                    Method callNativeModule has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      public native void callNativeModule(String instanceId, String module, String method, byte[]
                          arguments, byte[] options);

                      Method onChildNodeInserted has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              DocumentView view,
                              Object element,
                              int parentNodeId,
                              int previousNodeId,
                              Accumulator<Object> insertedElements) {

                        Method callNativeModule has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public Object callNativeModule(String instanceId, String module, String method, byte[] arguments, byte[] options) {

                          Method interpretResponseStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                      String requestId,
                                      @Nullable String contentType,
                                      @Nullable String contentEncoding,
                                      @Nullable InputStream inputStream,
                                      ResponseHandler responseHandler);

                            Function anim has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                            anim: function(ref, styles, timingFunction, duration, callback) {
                            Severity: Minor
                            Found in playground/app/src/main/assets/showcase/dropdown/dropdown-demo.js - About 35 mins to fix

                              Method callNativeComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                public native void callNativeComponent(String instanceId, String componentRef, String method,
                                                                       byte[] arguments, byte[] options);

                                Method callNativeComponent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public void callNativeComponent(String instanceId, String componentRef, String method, byte[] arguments, byte[] options) {

                                  Method setDefaultHeightAndWidthIntoRootDom has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public void setDefaultHeightAndWidthIntoRootDom(String s, float v, float v1, boolean b, boolean b1) {
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language