Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

see https://www.jetbrains.com/idea/download/#section=windows

Make sure you have added the Checkstyle plugin . Follow the below link

https://plugins.jetbrains.com/plugin/1065-checkstyle-idea

Configure ONAP code CheckStyle Plugin for IntelliJ

  1. Select, File, Settings, Tools, Checkstyle  
  2. Click on + beside the 'Configuration File' box to add a configuration
  3. Set description to something like 'ONAP Rules'
  4. Click on Browse to select the file <your_git_folder>/oparent/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml  
    (assuming you have downloaded the oparent repo)
  5. Complete the Wizard (you can set exclusion properties if needed)
  6. Select the Configuration File you just added by selecting the relevant checkbox
  7. Click [OK] to close the settings popup

Configure ONAP code style auto formatting for IntelliJ (using the same checkstyle rules and automating it for you (smile))

  1. Select, File, Settings, Editor, Code Style
  2. Click on the gear icon at the end of the line for "Scheme:"
  3. Optional: As importing a schema overrides the current scheme you might want to first use the 'Duplicate..' and  'Rename...' options to create an easily identifiable scheme e.g. 'ONAP Standard'
  4. Import Scheme→Checkstyle Configuration
  5. Click on Browse to select the file <your_git_folder>/oparent/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml  
    (assuming you have downloaded the oparent repo)
  6. Click OK

...

  • You need to be part of the onap organization in GitHub (see GitHub, click on your icon and select 'My Organizations')
    If you are not a member of this organization email support.linuxfoundation.org  and ask to be added to the onap organization in GitHub
    Note. It is possible to enter a different organization if you at least member of 1 organization (you can create your own in GitHub).
    The plugin wizard crashes if you are member of no organization at all, see this Bug: https://jira.sonarsource.com/browse/SLI-426
  • Make sure you have added the SonarLint plugin

To use SonarLint with Onap projects you need to setup a connection with SonarCloud

...

Install "pip3", if you plan to use git-review.

sudo apt-get update
sudo apt-get -y install python3-pip
pip3 --version

git-review (optional)

In a shell, type the following command (assumes you installed python above) :  

...