weexteam/weex_devtools_android

View on GitHub

Showing 472 of 2,519 total issues

Avoid too many return statements within this method.
Open

    return allowViewGroupResult ? viewGroup : null;

    Avoid too many return statements within this method.
    Open

            return 0;

      Avoid too many return statements within this method.
      Open

                return convertValue(value, field.getType());
      Severity: Major
      Found in inspector/src/main/java/com/taobao/weex/devtools/json/ObjectMapper.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

              return Long.parseLong(newValue);

          Avoid too many return statements within this method.
          Open

                  return null;

            Avoid too many return statements within this method.
            Open

                    return getPropertiesForProtoContainer((ObjectProtoContainer) object);

              Avoid too many return statements within this method.
              Open

                      return null;

                Avoid too many return statements within this method.
                Open

                      return Integer.parseInt(newValue);

                  Avoid too many return statements within this method.
                  Open

                          return getPropertiesForIterable((List) object, /* enumerate */ true);

                    Avoid too many return statements within this method.
                    Open

                        return null;

                      Method getDisplayHeight has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static int getDisplayHeight(AppCompatActivity activity) {
                              int height = 0;
                              if (activity != null && activity.getWindowManager() != null && activity.getWindowManager().getDefaultDisplay() != null) {
                                  Point point=new Point();
                                  activity.getWindowManager().getDefaultDisplay().getSize(point);
                      Severity: Minor
                      Found in appframework/src/main/java/com/alibaba/weex/commons/util/ScreenUtil.java - About 25 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 getAllEditTextViews has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static ArrayList<View> getAllEditTextViews(View view) {
                              ArrayList<View> allchildren = new ArrayList<View>();
                              if (view instanceof ViewGroup) {
                                  ViewGroup vp = (ViewGroup) view;
                                  for (int i = 0; i < vp.getChildCount(); i++) {
                      Severity: Minor
                      Found in playground/app/src/androidTest/java/com/alibaba/weex/util/ViewUtil.java - About 25 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 onReceive has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          @Override
                          public void onReceive(Context context, Intent intent) {
                            if (IWXDebugProxy.ACTION_DEBUG_INSTANCE_REFRESH.equals(intent.getAction())) {
                              if (mRefreshListener != null) {
                                mRefreshListener.onRefresh();
                      Severity: Minor
                      Found in appframework/src/main/java/com/alibaba/weex/commons/AbsWeexActivity.java - About 25 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 convertValueToList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static final int
                          convertValueToList(CharSequence value, String[] options, int defaultValue)
                          {
                              if (null != value) {
                                  for (int i = 0; i < options.length; i++) {
                      Severity: Minor
                      Found in appframework/src/main/java/com/alibaba/weex/commons/util/XmlUtils.java - About 25 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 testDowngrade has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

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

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

                          private void doClickAction(String action, String actionValue){
                              setActivity(WXPageActivity.wxPageActivityInstance);
                              activity2 = getActivity();
                              Log.e(TAG, "activity2 = " + activity2.toString());
                      
                      
                      Severity: Minor
                      Found in playground/app/src/androidTest/java/com/alibaba/weex/util/TestFlow.java - About 25 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 findFirstScrollerByRootView has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static View findFirstScrollerByRootView(View  rootView){
                      
                              View firstScrollView = null;
                      
                              if(null != rootView){

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

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

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

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

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

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

                      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