You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jlahoda (via GitHub)" <gi...@apache.org> on 2024/01/21 19:31:06 UTC

[PR] Updating the website to the (upoming) jackpot30 20.0 [netbeans-antora-site]

jlahoda opened a new pull request, #11:
URL: https://github.com/apache/netbeans-antora-site/pull/11

   A variant of:
   https://github.com/apache/netbeans-website/pull/689
   for this repository. Not sure which is the correct one, but this one was pointed out by @mbien
   
   This adds (some) description of how to run the standard Java hints using Jackpot in Maven. This is a preliminary PR so far, as it depends on features added here:
   https://github.com/apache/netbeans-jackpot30/pull/36
   and also on a release of Jackpot v version 20.0.
   


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Updating the website to the (upoming) jackpot30 20.0 [netbeans-antora-site]

Posted by "jtulach (via GitHub)" <gi...@apache.org>.
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Updating the website to the (upoming) jackpot30 20.0 [netbeans-antora-site]

Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on PR #11:
URL: https://github.com/apache/netbeans-antora-site/pull/11#issuecomment-1903567867

   @jlahoda this is the right place.


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists