-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
12. IDE instructions
Ilkka Seppälä edited this page Mar 30, 2024
·
26 revisions
- Clone the project
git clone https://github.com/iluwatar/java-design-patterns.git
- Download IntelliJ IDEA from https://www.jetbrains.com/idea/download/
- Import project - point to project root
pom.xml
- There is
.editorconfig
at the root of the repository and it should be applied automatically. - Enable annotation processing File - Settings - Build, Execution, Deployment - Compiler - Annotation Processors - Enable annotation processing (Lombok needs this)
- We use Checkstyle to enforce code style
- Install Checkstyle plugin File - Settings - Plugins - CheckStyle-IDEA
- You can run Checkstyle checks by activating the Checkstyle view with View - Tool windows - Checkstyle and clicking Check project. Ensure that Google Checks ruleset is activated. (command line:
./mvnw validate
)
- We use SonarCloud for static analysis
- The same scans can be executed on the local machine using SonarLint plugin
- Install SonarLint plugin: File - Settings - Plugins - SonarLint
- View - Tool Windows - SonarLint
- Configure SonarLint
- Check "Bind project to SonarCloud / SonarQube"
- Configure the connection - Click + icon - Select SonarCloud - Enter token: c9e61f6ba34e72faba39c554b984b49712743846
- Now you should be able to run Sonar scans using the same settings as the SonarCloud project uses (https://sonarcloud.io/project/overview?id=iluwatar_java-design-patterns)