You are looking at the developer documentation for the most recent public release of RepoSense.
The version matching the latest master
branch is here.
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:
The issues for first timers usually have guidance provided in the comment or have linked pull requests from previous contributors. You can refer to them for implementation details.
gradlew checkstyleAll
to check the style of all the relevant Java code. This will check the Java code in the following order: main code -> test code -> systemtest code.gradlew checkstyleMain
. Likewise, for test code, run gradlew checkstyleTest
and for systemtest code, run gradlew checkstyleSystemtest
.gradlew checkstyleMain checkstyleTest
or gradlew checkstyleTest checkstyleSystemtest
.gradlew lintFrontend
from the project root directory. You can also run npm run lintfix
in the frontend
folder to automatically fix some of the JavaScript and CSS lint errors.gradlew environmentalChecks
from the project root directory. This checks if all files end with a newline, if prohibited line endings (\r\n
) are present and if trailing whitespaces are present.gradlew run
from the project root. By default, it will run based on the config files in the [project root]/config
folder, and generate the report in the [project root]/reposense-report
folder.-Dargs="[FLAGS]"
format.gradlew run -Dargs="--since 31/12/2019 --formats java adoc xml"
gradlew run -Dargs="--view"
to generate the report and view it in the default browser.-Dargs="[FLAGS]"
.You can use the hot reloading feature to see how your code changes the functionality of the website in real time.
gradlew run
with the appropriate flags.gradlew hotReloadFrontend
.You can use Vue.js devtools for frontend debugging on Chrome. Here are the steps:
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.F12
or right click and choose inspect
at the report page.Vue
at the navigation bar.See vue-devtools project home page for more details.
We use Cypress for automated end-to-end front-end testing.
frontend/cypress/tests
.gradlew cypress
.Read Cypress's Documentation to familiarize yourself with its syntax and Cypress's debugging guide to tackle problems with your tests.
Note that it is compulsory to add tests for the new front-end changes that you made to prevent regression bugs, except for trivial changes that are unlikely to cause any regression or other situations where testing does not apply to the change.
To run all tests locally, run gradlew frontendTest
.
gradlew cypress
then select the test file(s) in the Cypress GUI as shown above.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.
The back-end tests can be found at [project root]/systemtest
and [project root]/test
.
To run all the system tests, run gradlew systemtest
.
To run all the unit and integration tests, run gradlew test
.
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 , add the tags="production"
attribute to the HTML element enclosing the content. Similarly, tags="dev"
will make the content appear only in the .
<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.