weexteam/weex_devtools_android

View on GitHub

Showing 472 of 2,519 total issues

Function ready has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      ready: function() {
        var storage = __weex_require__('@weex-module/storage');
        var me = this;


Severity: Minor
Found in playground/app/src/main/assets/module/storage-demo.js - About 1 hr to fix

    Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Before
        public void setUp() throws InterruptedException {
            super.setUp();
            HashMap testMap = new <String, Object> HashMap();
            testMap.put("testComponet", "AG_CommonStyle");

      Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Before
          public void setUp() throws InterruptedException {
              super.setUp();
              HashMap testMap = new <String, Object> HashMap();
              testMap.put("testComponet", "AG_CommonStyle");

        Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @Before
            public void setUp() throws InterruptedException {
                super.setUp();
                HashMap testMap = new <String, Object> HashMap();
                testMap.put("testComponet", "AG_CommonStyle");

          Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Before
              public void setUp() throws InterruptedException {
                  super.setUp();
                  HashMap testMap = new <String, Object> HashMap();
                  testMap.put("testComponet", "AG_CommonStyle");

            Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Before
                public void setUp() throws InterruptedException {
                    super.setUp();
                    HashMap testMap = new <String, Object> HashMap();
                    testMap.put("testComponet", "AG_CommonStyle");

              Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Before
                  public void setUp() throws InterruptedException {
                      super.setUp();
                      HashMap testMap = new <String, Object> HashMap();
                      testMap.put("testComponet", "AG_CommonStyle");

                Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Before
                    public void setUp() throws InterruptedException {
                        super.setUp();
                        HashMap testMap = new <String, Object> HashMap();
                        testMap.put("testComponet", "AG_CommonStyle");

                  Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Before
                      public void setUp() throws InterruptedException {
                          super.setUp();
                          HashMap testMap = new <String, Object> HashMap();
                          testMap.put("testComponet", "AG_CommonStyle");

                    Method setUp has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        @Before
                        public void setUp() throws InterruptedException {
                            super.setUp();
                            HashMap testMap = new <String, Object> HashMap();
                            testMap.put("testComponet", "AG_Text");

                      Method onCreateView has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        @Override
                        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                                 Bundle savedInstanceState) {
                          // Inflate the layout for this fragment
                          View root = inflater.inflate(R.layout.fragment_environment, container, false);

                        Method dispatchKeyEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          @ChromeDevtoolsMethod
                          public JsonRpcResult dispatchKeyEvent(JsonRpcPeer peer, JSONObject params) {
                            final DispatchKeyEventRequest request = mObjectMapper.convertValue(params, DispatchKeyEventRequest.class);
                            if (KEY_UP.equals(request.type)) {
                              Instrumentation instrumentation = new Instrumentation();

                          Method callLayout has 9 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public int callLayout(String s, String s1, int i, int i1, int i2, int i3, int i4, int i5, int i6) {

                            Method callCreateBody has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public int callCreateBody(String pageId, String componentType, String ref, HashMap<String, String> styles, HashMap<String, String> attributes, HashSet<String> events, float[] margins, float[] paddings, float[] borders) {

                              Method teeInputWithDecompression has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                public static InputStream teeInputWithDecompression(
                                    NetworkPeerManager peerManager,
                                    String requestId,
                                    InputStream availableInputStream,
                                    OutputStream decompressedOutput,

                                Method getTestCaseListViewByText has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public ArrayList<View> getTestCaseListViewByText(String byText) throws InterruptedException {
                                        Log.e("TestScript_Guide", "byText ==" + byText);
                                
                                        if(TextUtils.isEmpty(byText)){
                                            return null;

                                  Method convertArrayToList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    private List<Object> convertArrayToList(Field field, JSONArray array)
                                        throws IllegalAccessException, JSONException {
                                      if (List.class.isAssignableFrom(field.getType())) {
                                        ParameterizedType parameterizedType = (ParameterizedType) field.getGenericType();
                                        Type[] types = parameterizedType.getActualTypeArguments();

                                    Method getExistedModules has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static Map<String, TypeModuleFactory> getExistedModules(boolean global) {
                                          Map<String, TypeModuleFactory> modules = new HashMap<>();
                                          if (global) {
                                            try {
                                              Field sGlobalField = WXModuleManager.class.getDeclaredField("sGlobalModuleMap");

                                      Method onGetStyles has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        @Override
                                        protected void onGetStyles(WXComponent element, StyleAccumulator accumulator) {
                                          HashMap<String, String> map = getStyles(element);
                                          if (map != null && map.size() > 0) {
                                            for (HashMap.Entry<String, String> entry : map.entrySet()) {

                                        Method writeToConsole has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          public void writeToConsole() {
                                            Log.d(TAG, "health report(" + bundleUrl + ")");
                                            Log.d(TAG, "[health report] maxLayer:" + maxLayer);
                                            Log.d(TAG, "[health report] maxLayerOfRealDom:" + maxLayerOfRealDom);
                                            Log.d(TAG, "[health report] hasList:" + hasList);
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language