jtulach commented on code in PR #11: URL: https://github.com/apache/netbeans-antora-site/pull/11#discussion_r1461319870
########## modules/ROOT/pages/jackpot/index.adoc: ########## @@ -42,19 +42,48 @@ For maven projects, this typically means placing the file into `src/main/resourc The format of the file is described xref:./HintsFileFormat.adoc[here]. -== Using Maven to Run Declarative Refactorings +== Using Maven to Run Declarative Refactorings or Standard Java Hints -To use run the declarative hints in a Maven project, add the tool to the build plugins in pom.xml: -[source,java] +To use the declarative hints or standard Java hints in a Maven project, either for verification, +or for transformation, add the tool to the build plugins in pom.xml: +[source,xml] ---- <plugin> <groupId>org.apache.netbeans.modules.jackpot30</groupId> <artifactId>jackpot30-maven-plugin</artifactId> - <version>13.0</version> + <version>20.0</version> </plugin> ---- -And declare the hints in `.hint` files under `src/main/resources/META-INF/upgrade`, for example: +Configuration can be specified like this: +[source,xml] +---- +<plugin> + <groupId>org.apache.netbeans.modules.jackpot30</groupId> + <artifactId>jackpot30-maven-plugin</artifactId> + <version>20.0</version> + <configuration> + <hint>SizeReplaceableByIsEmpty</hint> Review Comment: Having a list of available values somewhere would be benefitial. Having such list in a documentation would help people understand the value of Jackpot without trying it out manually. ########## modules/ROOT/pages/jackpot/index.adoc: ########## @@ -42,19 +42,48 @@ For maven projects, this typically means placing the file into `src/main/resourc The format of the file is described xref:./HintsFileFormat.adoc[here]. -== Using Maven to Run Declarative Refactorings +== Using Maven to Run Declarative Refactorings or Standard Java Hints -To use run the declarative hints in a Maven project, add the tool to the build plugins in pom.xml: -[source,java] +To use the declarative hints or standard Java hints in a Maven project, either for verification, +or for transformation, add the tool to the build plugins in pom.xml: +[source,xml] ---- <plugin> <groupId>org.apache.netbeans.modules.jackpot30</groupId> <artifactId>jackpot30-maven-plugin</artifactId> - <version>13.0</version> + <version>20.0</version> </plugin> ---- -And declare the hints in `.hint` files under `src/main/resources/META-INF/upgrade`, for example: +Configuration can be specified like this: +[source,xml] +---- +<plugin> + <groupId>org.apache.netbeans.modules.jackpot30</groupId> + <artifactId>jackpot30-maven-plugin</artifactId> + <version>20.0</version> + <configuration> + <hint>SizeReplaceableByIsEmpty</hint> + <failOnWarnings>true</failOnWarnings> + </configuration> +</plugin> +---- + +Supported configuration options are: + +- `hint`: the hint or hints that should be invoked. Can either be a comma-separated list of `@SuppressWarnings` keys of hints to invoke, or the display name of the hint to invoke, +- `configuration`: a configuration file (from NetBeans) specifying which hints should be run, +- `failOnWarnings`: when `true`, and any warning will be printed, the build will fail. + +Supported goals are: + +- `jackpot30:analyze`: run the hints, and print warnings produce by them possible failing the build, as specified, Review Comment: ```suggestion - `jackpot30:analyze`: run the hints, and print warnings produce by them possibly failing the build, as specified, ``` ########## modules/ROOT/pages/jackpot/index.adoc: ########## @@ -42,19 +42,48 @@ For maven projects, this typically means placing the file into `src/main/resourc The format of the file is described xref:./HintsFileFormat.adoc[here]. -== Using Maven to Run Declarative Refactorings +== Using Maven to Run Declarative Refactorings or Standard Java Hints -To use run the declarative hints in a Maven project, add the tool to the build plugins in pom.xml: -[source,java] +To use the declarative hints or standard Java hints in a Maven project, either for verification, +or for transformation, add the tool to the build plugins in pom.xml: +[source,xml] ---- <plugin> <groupId>org.apache.netbeans.modules.jackpot30</groupId> <artifactId>jackpot30-maven-plugin</artifactId> - <version>13.0</version> + <version>20.0</version> </plugin> ---- -And declare the hints in `.hint` files under `src/main/resources/META-INF/upgrade`, for example: +Configuration can be specified like this: +[source,xml] +---- +<plugin> + <groupId>org.apache.netbeans.modules.jackpot30</groupId> + <artifactId>jackpot30-maven-plugin</artifactId> + <version>20.0</version> + <configuration> + <hint>SizeReplaceableByIsEmpty</hint> + <failOnWarnings>true</failOnWarnings> + </configuration> +</plugin> +---- + +Supported configuration options are: + +- `hint`: the hint or hints that should be invoked. Can either be a comma-separated list of `@SuppressWarnings` keys of hints to invoke, or the display name of the hint to invoke, +- `configuration`: a configuration file (from NetBeans) specifying which hints should be run, Review Comment: Description how to obtain such _configuration file_ is needed, otherwise it is not clear at all how to get it. ########## modules/ROOT/pages/jackpot/index.adoc: ########## @@ -42,19 +42,48 @@ For maven projects, this typically means placing the file into `src/main/resourc The format of the file is described xref:./HintsFileFormat.adoc[here]. -== Using Maven to Run Declarative Refactorings +== Using Maven to Run Declarative Refactorings or Standard Java Hints -To use run the declarative hints in a Maven project, add the tool to the build plugins in pom.xml: -[source,java] +To use the declarative hints or standard Java hints in a Maven project, either for verification, +or for transformation, add the tool to the build plugins in pom.xml: +[source,xml] ---- <plugin> <groupId>org.apache.netbeans.modules.jackpot30</groupId> <artifactId>jackpot30-maven-plugin</artifactId> - <version>13.0</version> + <version>20.0</version> </plugin> ---- -And declare the hints in `.hint` files under `src/main/resources/META-INF/upgrade`, for example: +Configuration can be specified like this: +[source,xml] +---- +<plugin> + <groupId>org.apache.netbeans.modules.jackpot30</groupId> + <artifactId>jackpot30-maven-plugin</artifactId> + <version>20.0</version> + <configuration> + <hint>SizeReplaceableByIsEmpty</hint> + <failOnWarnings>true</failOnWarnings> + </configuration> +</plugin> +---- + +Supported configuration options are: + +- `hint`: the hint or hints that should be invoked. Can either be a comma-separated list of `@SuppressWarnings` keys of hints to invoke, or the display name of the hint to invoke, +- `configuration`: a configuration file (from NetBeans) specifying which hints should be run, +- `failOnWarnings`: when `true`, and any warning will be printed, the build will fail. + +Supported goals are: + +- `jackpot30:analyze`: run the hints, and print warnings produce by them possible failing the build, as specified, +- `jackpot30:apply`: run the hints, and apply the primary proposed changes on each place where the hint would produce a warning. Please note this will be applied directly into the working copy of the files, +- `jackpot30:list`: list the support standard and custom Java hints. Review Comment: Can you give example how to check for `@NotNull` and co. annotations in a project? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists