Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTA-2153: Docs improvements #839

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/topics/about-rules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[id="about-rules_{context}"]
= About {ProductShortName} rules

The {ProductName} ({ProductShortName}) contains rule-based migration tools (analyzers) that analyze the APIs, technologies, and architectures used by the applications you plan to migrate. {ProductShortName} uses analyzer rules internally to extract files from archives, decompile files, scan and classify file types, analyze XML and other file content, analyze the application code, and build the reports.
The {ProductFullName} contains rule-based migration tools (analyzers) that analyze the APIs, technologies, and architectures used by the applications you plan to migrate. {ProductShortName} uses analyzer rules internally to extract files from archives, decompile files, scan and classify file types, analyze XML and other file content, analyze the application code, and build reports.

{ProductShortName} builds a data model based on the rule execution results and stores component data and relationships in a graph database, which can then be queried and updated as needed by the migration rules and for reporting purposes.

Expand All @@ -19,7 +19,7 @@ when(condition)
tag(tags)
----

Although {ProductShortName} provides a comprehensive set of standard migration rules out-of-the-box, you can create your own custom analyzer rules as well. You can use custom rules to identify use of custom libraries or other components that might not be covered by the provided out-of-the-box rulesets.
Although {ProductShortName} provides a comprehensive set of standard migration rules out-of-the-box, you can create your own custom analyzer rules as well. You can use custom rules to identify use of custom libraries or other components that might not be covered by the provided rulesets.
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved

ifndef::rules-development-guide[]
If you plan to write your own custom rules, see the {ProductDocRulesGuideURL}[_{RulesDevBookName}_] for detailed instructions.
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/create-basic-yaml-rule-template.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ when(condition)
----
.Procedure

. In the `/home/<USER>/` directory, create a file containing the basic syntax for YAML rules as follows:
+
In the `/home/<USER>/` directory, create a file containing the basic syntax for YAML rules as follows:

[source,terminal]
----
- category: mandatory
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/create-first-yaml-rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This section guides you through the process of creating and testing your first {ProductShortName} YAML-based rule. This assumes that you have already installed {ProductShortName}. See link:{ProductDocUserGuideURL}/index#installing_and_running_the_cli[Installing and running the CLI] in the _{UserCLIBookName}_ for installation instructions.

In this example, you will create a rule to discover instances where an application defines a `jboss-web.xml` file containing a `<class-loading>` element and to provide a link to the documentation that describes how to migrate the code.
In this example, you create a rule to discover instances where an application defines a `jboss-web.xml` file containing a `<class-loading>` element and to provide a link to the documentation that describes how to migrate the code.

[id="creating-yaml-file-for-the-rule_{context}"]
== Creating a YAML file for the rule
Expand Down Expand Up @@ -146,7 +146,7 @@ The rule is now complete and looks similar to the following:
== Installing the rule

.Procedure
. Point the CLI to the rule file you created :
Point the CLI to the rule file you created :
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved
+
[options="nowrap",subs="attributes+"]
----
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/create-yaml-rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Each rule file contains one or more YAML rules. Every rule comprises metadata, c

. Create a `when` condition.
+
The `when` condition of a YAML rule can be `provider`, `and` or `or`.
The `when` condition of a YAML rule can be `provider`, `and`, or `or`.

.. Create a `provider` condition
+
Expand Down Expand Up @@ -125,7 +125,7 @@ The table below lists all available providers, their capabilities, and their fie
|Yes
|Finds files with names matching this pattern
|`hasTags`
3+>|This is an inline list of string tags. See _Tag Action_ for details on tag format.
3+>|This is an inline list of string tags. See xref:yaml-rule-actions_rules-development-guide[Tag actions] for details on tag format.

.5+.^|`go`
|`referenced`
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/intellij-idea-plugin-run-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can create multiple run configurations to run against each project you impor
. In the *Projects* view, click the project you want to analyze.
. On the left side of the screen, click the *{ProductName}* tab.
+
If this is your first configuration, the run configuration panel is displayed on the right.
If this is your first configuration, the *Run Configuration* panel is displayed on the right.
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved

anarnold97 marked this conversation as resolved.
Show resolved Hide resolved
. If this is not your first configuration, right-click configuration in the list and select *New configuration*.
+
Expand Down
20 changes: 10 additions & 10 deletions docs/topics/yaml-rule-structure-syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ category: mandatory <4>
[id="yaml-rule-labels_{context}"]
=== Rule labels

Labels are `key=val` pairs specified for rules or rulesets as well as dependencies. For dependencies, a provider adds the labels to the dependencies when retrieving them. Labels on a ruleset are automatically inherited by all the rules that belong to it.
Labels are `key=val` pairs specified for rules or rulesets, as well as dependencies. For dependencies, a provider adds the labels to the dependencies when retrieving them. Labels on a ruleset are automatically inherited by all the rules that belong to it.

.Label format

Expand Down Expand Up @@ -88,7 +88,7 @@ The analyzer defines some labels that have special meaning as follows:

.Label selector

The analyzer CLI takes the `--label-selector` field as an option. It is a string expression that supports logical AND, OR and NOT operations. You can use it to filter-in or filter-out rules by their labels.
The analyzer CLI takes the `--label-selector` field as an option. It is a string expression that supports logical AND, OR, and NOT operations. You can use it to filter-in or filter-out rules by their labels.

_Examples:_

Expand Down Expand Up @@ -147,7 +147,7 @@ The Java provider in the analyzer can also add an exclude label to a list of pac
=== Rule categories

* `mandatory`
** You must resolve the issue for a successful migration, otherwise, the resulting application is not expected to build or run successfully. An example of such an issue is proprietary APIs that are not supported on the target platform.
** You must resolve the issue for a successful migration. Otherwise, the resulting application is not expected to build or run successfully. An example of such an issue is proprietary APIs that are not supported on the target platform.
* `optional`
** If you do not resolve the issue, the application is expected to work, but the results might not be optimal. If you do not make the change at the time of migration, you need to put it on the schedule soon after your migration is completed. An example of such an issue is EJB 2.x code not upgraded to EJB 3.
* `potential`
Expand Down Expand Up @@ -233,7 +233,7 @@ when:

==== Provider conditions

{ProductShortName} supports multi-language source code analysis. Searching for a specific language in the source code is enabled using the `provider` condition. This condition defines a search query for a specific language provider. The `provider` condition also specifies which of the provider's "capabilities" to use for analyzing the code.
{ProductShortName} supports multi-language source code analysis. You can search for a specific language in the source code using the `provider` condition. This condition defines a search query for a specific language provider. The `provider` condition also specifies which of the provider's "capabilities" to use for analyzing the code.
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved
anarnold97 marked this conversation as resolved.
Show resolved Hide resolved

The `provider` condition has the form `<provider_name>.<capability>`:

Expand Down Expand Up @@ -325,7 +325,7 @@ when:
- "tag1"
- "tag2"
----
<1> When more than one tags is given, a logical AND is implied.
<1> When more than one tag is given, a logical AND is implied.

===== `java` provider

Expand All @@ -334,7 +334,7 @@ The `java` provider analyzes Java source code.
This provider has the following capabilities:

* `referenced`
* `dependency`.
* `dependency`

.`referenced`

Expand All @@ -350,7 +350,7 @@ when:
<1> A RegEx pattern to match, for example, `org.kubernetes.*`
<2> Specifies the exact location where the pattern needs to be matched, for example, `IMPORT`

The supported locations are the following:
The following locations are supported:

* `CONSTRUCTOR_CALL`
* `TYPE`
Expand Down Expand Up @@ -411,7 +411,7 @@ when:

==== Custom variables

Provider conditions can have associated custom variables. You can use custom variables to capture relevant information from the matched line in the source code. The values of these variables are interpolated with data matched in the source code. These values can be used to generate detailed templated messages in a rule’s action (see xref:yaml-rule-actions_{context}[Message actions]). They can be added to a rule in the `customVariables` field:
Provider conditions can have associated custom variables. You can use custom variables to capture relevant information from the matched line in the source code. The values of these variables are interpolated with data matched in the source code. These values can be used to generate detailed template messages in a rule’s action (see xref:yaml-rule-actions_{context}[Message actions]). They can be added to a rule in the `customVariables` field:

[source,terminal]
----
Expand Down Expand Up @@ -509,7 +509,7 @@ when:

A set of rules forms a ruleset. {ProductShortName} does not require every rule file to belong to a ruleset, but you can use rulesets to group multiple rules that achieve a common goal and to pass the rules to the rules engine.

You can create a ruleset by placing one or more YAML rules in a directory and creating a `ruleset.yaml` file at the directory root. When you pass this directory as input to the {ProductShortName} {CLIName} using the `--rules` option, all rules in this directory are treated as a part of the ruleset defined by `ruleset.yaml` file.
You can create a ruleset by placing one or more YAML rules in a directory and creating a `ruleset.yaml` file at the directory root. When you pass this directory as input to the {ProductShortName} {CLIName} using the `--rules` option, all rules in this directory are treated as a part of the ruleset defined by the `ruleset.yaml` file.

The `ruleset.yaml` file stores the metadata of the ruleset.

Expand All @@ -522,4 +522,4 @@ labels: <2>
----
<1> The name must be unique within the provided rulesets.

<2> Ruleset labels are inherited by all rules that belong to the ruleset.
<2> Ruleset labels are inherited by all rules that belong to the ruleset.