Skip to content
jplucinski edited this page Jun 5, 2019 · 3 revisions

Getting started

If you would like to participate in AEM Rules development please find some introduction below.

  1. Clone repository on your local https://github.com/Cognifide/AEM-Rules-for-SonarQube/

  2. Build your jar package mvn clean install or mvn package To skip licence update please use -Dlicense.skip=true param.

  3. Creating new rule

    1. Rule implementation
      1. Create java class under com.cognifide.aemrules.htl.checks package that extends AbstractHtlCheck
    2. Register rule
      1. Add created rule to CLASSES list in HtlCheckClasses
      2. Update test class method HtlProfileTest.sanity
    3. Rule test
      1. Create test class in com.cognifide.aemrules.htl.checks package that extends AbstractBaseTest
      2. HTML/HTL files used for testing purposes should be placed under src/test/files/checks/htl/ directory
    4. Update docs
      1. Add short description in README.md placed in root folder
      2. Create file \src\main\resources\rules\HTL-{rule-id} containing full description with compliant and noncompliant examples

If your using docker setup, copy jar file to shared folder and restart SonarQube, manually or with a curl command curl --user admin:admin --request POST http://localhost:9000/api/system/restart

Clone this wiki locally