weexteam/weex_devtools_android

View on GitHub

Showing 472 of 2,519 total issues

Function 19 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

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

Severity: Minor
Found in playground/app/src/main/assets/showcase/new-fashion/headlines.js - About 35 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 getColor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public int getColor() {
      byte alpha;
      if (this.a == null) {
        alpha = (byte) 255;
      } else {

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

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

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

Severity: Minor
Found in playground/app/src/main/assets/showcase/new-fashion/resource.js - About 35 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

Function 19 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

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

Severity: Minor
Found in playground/app/src/main/assets/showcase/new-fashion/brand.js - About 35 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 updateScreenBitmap has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private void updateScreenBitmap() {
      if (!mIsRunning) {
        return;
      }
      Activity activity = mActivityTracker.tryGetTopActivity();

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

Avoid too many return statements within this method.
Open

            return;
Severity: Major
Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return;
    Severity: Major
    Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return res;
      Severity: Major
      Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return;
        Severity: Major
        Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return res;
          Severity: Major
          Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return;
            Severity: Major
            Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                      return value;
              Severity: Major
              Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return Long.valueOf(parser.getAttributeValue(null, "value"));
                Severity: Major
                Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return;
                  Severity: Major
                  Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return res;
                    Severity: Major
                    Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return;
                      Severity: Major
                      Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return;
                        Severity: Major
                        Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return;
                          Severity: Major
                          Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return res;
                            Severity: Major
                            Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return res;
                              Severity: Major
                              Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language