LarryHsiao/Nyx

View on GitHub
app/src/main/java/com/larryhsiao/nyx/syncs/CallBackServer.java

Summary

Maintainability
A
1 hr
Test Coverage

Method loginSuccessHtml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private String loginSuccessHtml(){
        return  "<!DOCTYPE html>\n" +
            "<html>\n" +
            "  \n" +
            "<body>\n" +
Severity: Minor
Found in app/src/main/java/com/larryhsiao/nyx/syncs/CallBackServer.java - About 1 hr to fix

    '+' should be on a new line.
    Open

                "        function backToApp() {\n" +

    '+' should be on a new line.
    Open

                "<body>\n" +

    '+' should be on a new line.
    Open

                "        You are logged in.\n" +

    '+' should be on a new line.
    Open

                "        \n" +

    '+' should be on a new line.
    Open

                "    <!-- Define the button to \n" +

    '+' should be on a new line.
    Open

                "    </p>\n" +

    '+' should be on a new line.
    Open

                "            return false;\n" +

    '+' should be on a new line.
    Open

                "    <h1 style=\"color: black;\">\n" +

    '+' should be on a new line.
    Open

                "  \n" +

    '+' should be on a new line.
    Open

                "    </button>\n" +

    '+' should be on a new line.
    Open

                "      \n" +

    '+' should be on a new line.
    Open

                "</body>\n" +

    '+' should be on a new line.
    Open

                "<html>\n" +

    '+' should be on a new line.
    Open

                "  \n" +

    '+' should be on a new line.
    Open

                "    </h1>\n" +

    '+' should be on a new line.
    Open

                "  \n" +

    '+' should be on a new line.
    Open

                "  \n" +

    Distance between variable 'msg' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).
    Open

            String msg = loginSuccessHtml();

    Checks the distance between declaration of variable and its first usage.

    This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

    '+' should be on a new line.
    Open

                "    <p>\n" +

    '+' should be on a new line.
    Open

                "        Done \n" +

    '+' should be on a new line.
    Open

                "    <button onclick=\"return backToApp();\">\n" +

    '+' should be on a new line.
    Open

                "       close the window -->\n" +

    '+' should be on a new line.
    Open

            return  "<!DOCTYPE html>\n" +

    '+' should be on a new line.
    Open

                "        }\n" +

    '+' should be on a new line.
    Open

                "    <script type=\"text/javascript\">\n" +

    '+' should be on a new line.
    Open

                "    </script>\n" +

    There are no issues that match your filters.

    Category
    Status