• HOME
  • SHOWCASE
  • USER GUIDE
  • DEVELOPER GUIDE
  • ABOUT
  • CONTACT
  • You are looking at the developer documentation for the most recent public release of RepoSense. The version matching the latest master branch is here.

    Workflow

    Our workflow is mostly based on the guidelines given at se-education.org/guides.

    To submit a PR, follow this guide, but note the following:

    • As we squash the commits when merging a PR, there is no need to follow a strict commit organization or write elaborate commit messages for each commit.
      However, when pushing new commits to your PR branch, do clean up new commits (i.e., commits not yet pushed) e.g., delete temporary print statements added for debugging purposes.
    • You can refer to the Architecture and the HTML Report to learn about the design and implementation of RepoSense.
    • The sections below has more information about various stages of submitting a PR.

    Following the code style

    • Make sure you know our coding standards.

    • Follow this to configure Intellij to follow our coding style.
    • This project uses Checkstyle to check the compliance of Java code. You can use this document to find how to use it.
    • To check Pug files for style errors, run npm run lint from the project root directory. You can use the npm run lintfix to automatically fix some of the javascript and css lint errors.

    Running the app from code

    • To run the app from code, run gradlew run from the project root. By default, it will run based on the config files in the [project root]/config folder.
    • To supply flags, you can use the -Dargs="[FLAGS]" format.
      e.g., gradlew run -Dargs="--since 31/12/2019 --formats java adoc xml"

    Debugging (front-end)

    You can use Vue.js devtools for frontend debugging on Chrome. Here are the steps:

    1. On your Chrome, visit the website of Vue.js devtools and add the extension.
    2. Go the detail page of this extension in Chrome's extension management panel and select Allow access to file URLs. If you are unable to locate it, copy the link: chrome://extensions/?id=nhdogjmejiglipccpnnnanhbledajbpd and visit it on your Chrome.
    3. Open any report generated by RepoSense.
    4. Press F12 or right click and choose inspect at the report page.
    5. Choose Vue at the navigation bar.
    6. Debug using the tool.

    See vue-devtools project home page for more details.

    Testing (front-end)

    We use Cypress for automated end-to-end front-end testing.

    Writing tests

    1. Create a new test file in frontend/cypress/tests
    2. At project root start Cypress Test Runner by running gradlew cypress
    3. On the top right hand corner, set Chrome as the default browser
    4. Under Integration Tests, click on the newly created test file to run it

    Read Cypress's Documentation to familiarize yourself with its syntax and Cypress's debugging guide to tackle problems with your tests.

    Running tests

    To run all tests locally, run gradlew frontendTest.

    If you encountered an invalid browser error, ensure that you have Chrome installed in the default installation directory. Otherwise, follow the instructions here to create symbolic links so Cypress can locate Chrome in your system.

    Writing documentation

    This project uses MarkBind for documentation. Follow this tutorial to learn how to use MarkBind for updating project documentation.

    To show some content only in the i.e., https://reposense.orgproduction website, add the tags="production" attribute to the HTML element enclosing the content. Similarly, tags="dev" will make the content appear only in the i.e., https://reposense.org/RepoSensedev website.

    <span tags="production">This will appear in the production website only.</span>
    <span tags="dev">This will appear in the dev website only.</span>
    This will appear in both sites.