Closed mike-solomon closed 1 year ago
Promising start! My one concern is that this also includes the data tables that are present for every run, such as Recipe performance
. I don't think is worthwhile to report those on all 1000+ recipes, but also not sure how best to handle those otherwise. Maybe hide only those in a collapsible block? Open to other suggestions.
Agree that we should not show the always-there data tables on every recipe
👍 Since it sounds like we don’t want to show these - should I just filter out the data tables with names that match the common ones? Most recipes wouldn’t show any data tables at that point. Dunno if that’s okay or not. Could also just list the common ones as a bullet point or something.
Most recipes have no data tables of their own, so it is correct not to display any
@sambsnyd @timtebeek Updated to filter out the three common data tables I'm aware of. If there are any others I should filter out, please let me know.
Fixes: https://github.com/openrewrite/rewrite-recipe-markdown-generator/issues/57
Here's an example of what a recipe doc with data tables looks like:
Check for dependency vulnerabilities
org.openrewrite.java.dependencies.DependencyVulnerabilityCheck
_This is a software composition analysis (SCA) tool which detects publicly disclosed vulnerabilities. If vulnerabilities are found, it will generate a report linking to the associated CVE entries. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable._
Source
GitHub, Issue Tracker, Maven Central
Options
String
Boolean
false
.Boolean
Data Tables (Only available on the Moderne platform)
Vulnerability report
Contains a vulnerability report the affected artifact and the vulnerability's CVE information.
com.google.guava:guava:VERSION
.com.google.guava:guava:VERSION
.Usage
This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your
rewrite.yml
create a new recipe with a unique name. For example:com.yourorg.DependencyVulnerabilityCheckExample
. Here's how you can define and customize such a recipe within your rewrite.yml:{% code title="rewrite.yml" %}
{% endcode %}
Now that
com.yourorg.DependencyVulnerabilityCheckExample
has been defined activate it and take a dependency on org.openrewrite.recipe:rewrite-java-dependencies:1.0.1 in your build file: {% tabs %} {% tab title="Gradle" %} {% code title="build.gradle" %}{% endcode %} {% endtab %} {% tab title="Maven" %} {% code title="pom.xml" %}
{% endcode %} {% endtab %} {% endtabs %}
See how this recipe works across multiple open-source repositories
The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.