Skip to content

Contributing

nx-sonarqube is an MIT-licensed open source project with its ongoing development made by contributors.

Setup Repository

Fork

Follow GitHub’s documentation on cloning a fork and creating a branch to work on

Dependencies

nx-sonarqube uses npm to manage its dependencies.

Before opening a pull request, run the following command from the root workspace folder to make sure your development dependencies are up-to-date:

Terminal window
npm ci

Contributing to the plugin

Folder structure

Source code for the nx-sonarqube plugin exists under the packages/nx-sonarqube folder. To contribute features or bug fixes to the framework, locate the relevant code in one of the packages/nx-sonarqube sub-folders.

Running locally

Run the following to serve the plugin and link the package to another consuming Nx workspace:

nx-sonarqube Workspace

Terminal one:

Terminal window
npx nx build nx-sonarqube --watch

Terminal two:

Terminal window
cd dist/packages/nx-sonarqube
npm link

Consuming Nx Workspace

Terminal window
npm link @koliveira15/nx-sonarqube

Commands

Build

nx-sonarqube uses Nx for builds. To build the plugin locally, run the following command from the root folder:

Terminal window
npx nx build nx-sonarqube

Unit Testing

nx-sonarqube uses Jest for tests. To test the plugin locally, run the following command from the root folder:

Terminal window
npx nx test nx-sonarqube

Linting

nx-sonarqube uses ESLint for linting. To lint the plugin locally, run the following command from the root folder:

Terminal window
npx nx lint nx-sonarqube

E2E Testing

To e2e test the plugin locally, run the following command from the root folder:

Terminal window
npx nx e2e nx-sonarqube-e2e

Contributing to the documentation and nx-sonarqube.dev website

The documentation site is built using:

  • Astro - Web framework for content-drive websites
  • Starlight - Astro plugin for documentation sites
  • Diátaxis - Methodology for documentation authoring

Folder structure

Source code for the nx-sonarqube docs and the nx-sonarqube.dev website exists under the apps/docs-site project folder. To contribute documentation or website content, locate the relevant source code in one of the sub-folders:

  • src/assets - Images and other static assets
  • src/content - Documentation pages with Astro MDX support
  • src/data - static data file used in examples
  • src/styles - CSS themes

Running locally

Run the following command from the root of the workspace serve the website:

Terminal window
npx nx serve docs-site

Commands

Build

To build the website locally, run the following command from the root folder:

Terminal window
npx nx build docs-site

Running static website locally

To run the generated static website locally, run the following command from the root folder:

Terminal window
npx http-server dist/apps/docs-site

Submission

Pull Requests

  • Rebase your branch against the current main.
  • Follow the Setup Repository steps above to make sure your forked development environment is up-to-date
  • Please ensure the test suite passes before submitting a PR.
  • If you’ve added new functionality, please include tests which validate its behavior.
  • Make reference to possible issues on PR comment.
  • PRs may include multiple commits. However, please keep content of all commits related. Raise separate PRs for disjoint changes.

Bug Reports

  • Search through issues or PRs to see if a previous issue has already been reported and/or fixed.
  • Provide a small reproduction using a GitHub repository.
  • Use the Bug issue template to open issues

New Features

  • We value keeping the API surface small and concise, which factors into whether new features are accepted.
  • The feature will be discussed and considered.
  • Once the PR is submitted, it will be reviewed and merged once approved.

Commit message guidelines

This repository uses the conventional commits standards. Your commit will not pass pre-commit hooks if it’s not followed.

Questions and requests for support

Questions and requests for support should not be opened as issues and should be handled in the following ways: