From e327da8e7856f7924529230d1ff7c1487eaf757a Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Mon, 15 Sep 2025 14:27:28 +0200 Subject: [PATCH] NO-JIRA Add documentation for contribution --- contributing.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/contributing.md b/contributing.md index 0fcc4d4..868fed1 100644 --- a/contributing.md +++ b/contributing.md @@ -1,17 +1,18 @@ -Contributing -============ +# SonarQube Scan Action + +## Contributing If you would like to see a new feature, please create a new thread in the forum ["Suggest new features"](https://community.sonarsource.com/c/suggestions/features). Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. -## Submitting a pull request +### Submitting a pull request With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make. Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing (Travis build is executed for each pull request). -## Next steps +### Next steps One of the members of our team will carefully review your pull request. You might be asked at this point for clarifications or your pull request might be rejected if we decide that it doesn't fit our roadmap and vision for the product. If your contribution looks promising then either we will decide: @@ -24,3 +25,34 @@ or Thank You! The SonarSource Team + +## Development + +Both the main action and the secondary _install-build-wrapper_ action are [Javascript actions](https://docs.github.com/en/actions/tutorials/create-actions/create-a-javascript-action). They need to be packaged to work properly. We follow the official guidelines and rely on rollup for that. + +### Requirements + +Make sure you have node 20 & npm installed. We recommend using [nvm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) for that. + +### Building & testing + +You'll first need to install dependencies: + +```sh +npm install +``` + +To use rollup to bundle the scripts, run the `build` command: + +```sh +npm run build +``` + +> ⚠️ Since the action uses the code in the repository, it is necessary to commit the bundled code! ⚠️ + + +To run the js unit tests, run the `test` command: + +```sh +npm run test +```