|
35 | 35 | <version.plugin.plugin>3.15.1</version.plugin.plugin> |
36 | 36 | <version.release.plugin>3.1.1</version.release.plugin> |
37 | 37 | <version.resources.plugin>3.3.1</version.resources.plugin> |
| 38 | + <version.rewrite.plugin>6.10.0</version.rewrite.plugin> |
| 39 | + <version.rewrite.static.analysis>2.10.0</version.rewrite.static.analysis> |
38 | 40 | <!-- Do not update for now as it is causing test issues in integration-tests/devmode |
39 | 41 | java.lang.NoClassDefFoundError: com/salesforce/jprotoc/Generator --> |
40 | 42 | <version.shade.plugin>3.2.1</version.shade.plugin> |
|
361 | 363 | </archive> |
362 | 364 | </configuration> |
363 | 365 | </plugin> |
| 366 | + <plugin> |
| 367 | + <groupId>org.openrewrite.maven</groupId> |
| 368 | + <artifactId>rewrite-maven-plugin</artifactId> |
| 369 | + <version>${version.rewrite.plugin}</version> |
| 370 | + <configuration> |
| 371 | + <activeRecipes> |
| 372 | + <recipe>org.openrewrite.staticanalysis.MissingOverrideAnnotation</recipe> |
| 373 | +<!-- <recipe>org.openrewrite.staticanalysis.NoToStringOnStringType</recipe>--> |
| 374 | +<!-- <recipe>org.openrewrite.staticanalysis.NoValueOfOnStringType</recipe>--> |
| 375 | +<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedLocalVariables</recipe>--> |
| 376 | +<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateFields</recipe>--> |
| 377 | +<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods</recipe>--> |
| 378 | +<!-- <recipe>org.openrewrite.staticanalysis.UnnecessaryCloseInTryWithResources</recipe>--> |
| 379 | +<!-- <recipe>org.openrewrite.staticanalysis.UnnecessaryExplicitTypeArguments</recipe>--> |
| 380 | +<!-- <recipe>org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement</recipe>--> |
| 381 | +<!-- <recipe>org.openrewrite.staticanalysis.UnnecessaryThrows</recipe>--> |
| 382 | + </activeRecipes> |
| 383 | + <failOnDryRunResults>true</failOnDryRunResults> |
| 384 | + <rewriteSkip>${format.skip}</rewriteSkip> |
| 385 | + </configuration> |
| 386 | + <dependencies> |
| 387 | + <dependency> |
| 388 | + <groupId>org.openrewrite.recipe</groupId> |
| 389 | + <artifactId>rewrite-static-analysis</artifactId> |
| 390 | + <version>${version.rewrite.static.analysis}</version> |
| 391 | + </dependency> |
| 392 | + </dependencies> |
| 393 | + </plugin> |
364 | 394 | <plugin> |
365 | 395 | <groupId>net.revelc.code.formatter</groupId> |
366 | 396 | <artifactId>formatter-maven-plugin</artifactId> |
|
623 | 653 | </pluginManagement> |
624 | 654 | </build> |
625 | 655 | </profile> |
| 656 | + <profile> |
| 657 | + <id>format</id> |
| 658 | + <activation> |
| 659 | + <activeByDefault>true</activeByDefault> |
| 660 | + <property> |
| 661 | + <name>!no-format</name> |
| 662 | + </property> |
| 663 | + </activation> |
| 664 | + <build> |
| 665 | + <plugins> |
| 666 | + <plugin> |
| 667 | + <groupId>org.openrewrite.maven</groupId> |
| 668 | + <artifactId>rewrite-maven-plugin</artifactId> |
| 669 | + <executions> |
| 670 | + <execution> |
| 671 | + <phase>process-sources</phase> |
| 672 | + <goals> |
| 673 | + <goal>run</goal> |
| 674 | + </goals> |
| 675 | + </execution> |
| 676 | + </executions> |
| 677 | + </plugin> |
| 678 | + <plugin> |
| 679 | + <groupId>net.revelc.code.formatter</groupId> |
| 680 | + <artifactId>formatter-maven-plugin</artifactId> |
| 681 | + <executions> |
| 682 | + <execution> |
| 683 | + <phase>process-sources</phase> |
| 684 | + <goals> |
| 685 | + <goal>format</goal> |
| 686 | + </goals> |
| 687 | + </execution> |
| 688 | + </executions> |
| 689 | + </plugin> |
| 690 | + <plugin> |
| 691 | + <groupId>net.revelc.code</groupId> |
| 692 | + <artifactId>impsort-maven-plugin</artifactId> |
| 693 | + <executions> |
| 694 | + <execution> |
| 695 | + <id>sort-imports</id> |
| 696 | + <goals> |
| 697 | + <goal>sort</goal> |
| 698 | + </goals> |
| 699 | + </execution> |
| 700 | + </executions> |
| 701 | + </plugin> |
| 702 | + </plugins> |
| 703 | + </build> |
| 704 | + </profile> |
| 705 | + <profile> |
| 706 | + <id>validate</id> |
| 707 | + <activation> |
| 708 | + <activeByDefault>true</activeByDefault> |
| 709 | + <property> |
| 710 | + <name>no-format</name> |
| 711 | + </property> |
| 712 | + </activation> |
| 713 | + <build> |
| 714 | + <plugins> |
| 715 | + <plugin> |
| 716 | + <groupId>org.openrewrite.maven</groupId> |
| 717 | + <artifactId>rewrite-maven-plugin</artifactId> |
| 718 | + <executions> |
| 719 | + <execution> |
| 720 | + <phase>process-sources</phase> |
| 721 | + <goals> |
| 722 | + <goal>dryRun</goal> |
| 723 | + </goals> |
| 724 | + </execution> |
| 725 | + </executions> |
| 726 | + </plugin> |
| 727 | + <plugin> |
| 728 | + <groupId>net.revelc.code.formatter</groupId> |
| 729 | + <artifactId>formatter-maven-plugin</artifactId> |
| 730 | + <executions> |
| 731 | + <execution> |
| 732 | + <phase>process-sources</phase> |
| 733 | + <goals> |
| 734 | + <goal>validate</goal> |
| 735 | + </goals> |
| 736 | + </execution> |
| 737 | + </executions> |
| 738 | + </plugin> |
| 739 | + <plugin> |
| 740 | + <groupId>net.revelc.code</groupId> |
| 741 | + <artifactId>impsort-maven-plugin</artifactId> |
| 742 | + <executions> |
| 743 | + <execution> |
| 744 | + <id>check-imports</id> |
| 745 | + <goals> |
| 746 | + <goal>check</goal> |
| 747 | + </goals> |
| 748 | + </execution> |
| 749 | + </executions> |
| 750 | + </plugin> |
| 751 | + </plugins> |
| 752 | + </build> |
| 753 | + </profile> |
626 | 754 | </profiles> |
627 | 755 | </project> |
0 commit comments