-
Notifications
You must be signed in to change notification settings - Fork 2k
Configuring custom SDK checkstyle with IntelliJ
This Checkstyle Plugin enables on-demand scanning of Java files so that they conform to our CheckStyle rules, from within IntelliJ IDEA.
-
Make sure you’ve got Checkstyle-IDEA plugin (9.2.1 version). If not, install via
File → Settings… → Plugins → Browse Repositories
. -
Build
sdk-build-tools-1.0.0.jar
.Compile the latest
sdk-build-tools-1.0.0.jar
from here.mvn clean install -f C:\~\Java\azure-sdk-for-java\eng\code-quality-reports\pom.xml
-
Open File > Settings > Tools > CheckStyle
3.1. Add the path of
sdk-build-tools-1.0.0.jar
to the Third-Party Checks as below:3.2. Click "+" to add a new custom checkstyle configuration file.
3.3. Add a description for the checkstyle configuration.
3.4. Click "Browse" and add the checkstyle configuration file in your local folder under eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
3.5. Click Next
-
Add checkstyle suppression file path.
Since the suppression file is in the same local directory enter "/".
-
Click "Next", you should get the following dialog. Click "Finish" to complete this setup.
-
This is the final screen of the checkstyle setup. Select the checkbox "sdk-checkstyle" and click Apply.
-
Verify the checkstyle results. Go to a Java file, Click on "Check Current File" or "Check Module" or "Check Project" to run the custom sdk-checkstyle configuration on your project.
- Frequently Asked Questions
- Azure Identity Examples
- Configuration
- Performance Tuning
- Android Support
- Unit Testing
- Test Proxy Migration
- Azure Json Migration
- New Checkstyle and Spotbugs pattern migration
- Protocol Methods
- TypeSpec-Java Quickstart