weexteam/weex_devtools_android

View on GitHub

Showing 2,519 of 2,519 total issues

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) {

            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/we-dropdown.js - About 35 mins to fix

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

                public native void callAddElement(String instanceId, String ref, String dom, String index,
                                                  String callback);

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

                    public InputStream interpretResponseStream(String requestId, String contentType, String contentEncoding, InputStream stream, boolean continueRead) {

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

                          public InputStream interpretResponseStream(String requestId, @Nullable String contentType, @Nullable String contentEncoding, @Nullable InputStream inputStream, ResponseHandler responseHandler) {

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

                      public static class LoadingFailedParams {
                        @JsonProperty(required = true)
                        public String requestId;
                    
                        @JsonProperty(required = true)
                    inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/module/Network.java on lines 201..213

                    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 46.

                    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

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

                      public static void copy(InputStream input, OutputStream output, byte[] buffer)
                          throws IOException {
                        int n;
                        while ((n = input.read(buffer)) != -1) {
                          output.write(buffer, 0, n);
                    protocol/src/main/java/com/taobao/weex/devtools/inspector/network/RequestBodyHelper.java on lines 219..225

                    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 46.

                    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

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

                        public static GZipOutputStream create(OutputStream finalOut) throws IOException {
                          PipedInputStream pipeIn = new PipedInputStream();
                          PipedOutputStream pipeOut = new PipedOutputStream(pipeIn);
                    
                          Future<Void> copyFuture = sExecutor.submit(
                    inspector/src/main/java/com/taobao/weex/devtools/inspector/network/GunzippingOutputStream.java on lines 39..47

                    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 46.

                    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

                      public static class Request {
                        @JsonProperty(required = true)
                        public String url;
                    
                        @JsonProperty(required = true)
                    inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/module/Network.java on lines 169..185

                    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 46.

                    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

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

                      public static GunzippingOutputStream create(OutputStream finalOut) throws IOException {
                        PipedInputStream pipeIn = new PipedInputStream();
                        PipedOutputStream pipeOut = new PipedOutputStream(pipeIn);
                    
                        Future<Void> copyFuture = sExecutor.submit(
                    protocol/src/main/java/com/taobao/weex/devtools/inspector/network/RequestBodyHelper.java on lines 137..145

                    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 46.

                    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

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

                        private static void copy(InputStream input, OutputStream output, byte[] buffer)
                                throws IOException {
                          int n;
                          while ((n = input.read(buffer)) != -1) {
                            output.write(buffer, 0, n);
                    inspector/src/main/java/com/taobao/weex/devtools/common/Util.java on lines 67..73

                    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 46.

                    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

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

                            @Nullable
                            @Override
                            public String firstHeaderValue(String name) {
                                for (Pair<String, String> pair : headers) {
                                    if (pair.first != null && pair.first.equalsIgnoreCase(name)) {
                    protocol/src/main/java/com/taobao/weex/devtools/inspector/network/utils/RequestConverter.java on lines 88..97

                    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 46.

                    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

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

                            @Nullable
                            @Override
                            public String firstHeaderValue(String name) {
                                for (Pair<String, String> pair : headers) {
                                    if (pair.first != null && pair.first.equalsIgnoreCase(name)) {
                    protocol/src/main/java/com/taobao/weex/devtools/inspector/network/utils/ResponseConverter.java on lines 82..91

                    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 46.

                    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

                    Method getFirstChildScrollableView has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static View getFirstChildScrollableView(ViewGroup view){
                    
                    
                            View viewResult = null;
                            ArrayList<View> allViews = new ArrayList<View>();
                    Severity: Minor
                    Found in playground/app/src/androidTest/java/com/alibaba/weex/util/ViewUtil.java - 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 readThisSetXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private static final HashSet readThisSetXml(XmlPullParser parser, String endTag, String[] name,
                                                                    ReadMapCallback callback) throws XmlPullParserException, java.io.IOException {
                            HashSet set = new HashSet();
                    
                            int eventType = parser.getEventType();
                    Severity: Minor
                    Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - 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 readThisMapXml has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static final HashMap<String, ?> readThisMapXml(XmlPullParser parser, String endTag,
                                                                              String[] name, ReadMapCallback callback)
                            throws XmlPullParserException, java.io.IOException
                        {
                            HashMap<String, Object> map = new HashMap<String, Object>();
                    Severity: Minor
                    Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - 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

                    Severity
                    Category
                    Status
                    Source
                    Language