nus-cs2113-AY2122S2 / forum

3 stars 2 forks source link

Java CI Failing Status in tP Pull Requests #44

Open alanlowzies opened 2 years ago

alanlowzies commented 2 years ago

Hi there, my team and I are having a dilemma in fixing a CI Failing issue in one of our pull requests.

While inspecting the Java CI check logs in the 'merge pull request' page on GitHub, we found the following errors:

 Error: eckstyle] [ERROR] /home/runner/work/tp/tp/src/main/java/seedu/duke/UI.java:13: <p> tag should be placed immediately before the first word, with no space after. [JavadocParagraph]
Error: eckstyle] [ERROR] /home/runner/work/tp/tp/src/main/java/seedu/duke/UI.java:13: <p> tag should be preceded with an empty line. [JavadocParagraph]

The offending JavaDoc in question is the following:

    /**
     * Prints a line on the console based on the default parameters defined in this Java class.
     * <p>
     * Source: Team Member Alan Low's iP codebase
     * Link: ...
     */
    protected void printLine() {
        <code body>
    }

Based on the CheckStyle documentation, the following change will resolve the issue:

    /**
     * Prints a line on the console based on the default parameters defined in this Java class.
     * 
     * <p>Source: Team Member Alan Low's iP codebase
     * Link: ...
     */
    protected void printLine() {
        <code body>
    }

However, the proposed fix will go against the recommended JavaDoc documentation style as defined in Oracle's Java documentation webpage.

Could someone kindly advise my team and I on how we can resolve the Java CI check failures without breaking the coding standard? Thank you in advance 🙂

okkhoy commented 2 years ago

Please follow this: https://se-education.org/guides/conventions/java/basic.html#comments The checkstyle should be configured to enforce our style guide. If it doesn't work, please let me know I will ask the relevant folks from the se-edu project and get back to you.

alanlowzies commented 2 years ago

Hi prof, thanks for the advice. I will try to configure the checkstyle to enforce our styling and will update this issue thread.