Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pattern: A pattern is a search string that is fired on the collective set of database designs and returns any code elements that match the search string. The format of a pattern can be in either plain text or in the form of a regex expression6expression*.


Note

...

Keep in mind that newly added patterns, insights and rulesets will not be evaluated until the next evening run which typically starts at 18:30 (depending on your ApplicationInsights server's locale). Please allow for at least one night for results to show up.

    1. A regular expression is a special text string for describing a search pattern. More information about Regex can be found on the internet

...


...

Table of Contents


Creating a Pattern


To create a design pattern, you first need to have the search string or regular expression you want to test for. You can use the Code Search to build and test a pattern and check whether it returns the results you would expect.
After knowing what pattern to search for open the Design Insights – Manage view and switch to the "Patterns" tab in the left column. All patterns are listed here.

To create a new one:

  • Enter a name for your new pattern in the top search field and make sure the name isn't already in use (to prevent confusion). Use descriptive names as it will make it easier to identify it later in the process.
  • Below the search value where you've entered the name a button will appear called "+ CLICK TO CREATE PATTERN". Click this to create the new pattern. The new pattern is created and added to the list.
  • Enter details in the meta data fields for the pattern like an authors name, tags and a description to make it clear what the pattern is about.
  • Enter the search pattern in the Pattern field. You can use the "Test" button behind this field to see quickly what would be returned but keep in mind that this test option is more limited than the Code Search view which will also give you information about the databases in which the results are found and links to those database design elements.
  • Use the 'save changes' button to save your new pattern.



Instead of creating a new one you can also duplicate an existing pattern by using the duplicate option behind the existing patterns name. This will create a copy that you can then edit to extend or change.
Image Modified

The new pattern will show in the list of patterns as unassigned (broken link icon) until it is assigned to an Insight.

...


Creating an Insight


To create a new insight, switch to the Insights tab on the left side of the Manage page and follow the following steps:

  • Enter the name of the new insight (again, use descriptive names for easy identification later) and make sure the name isn't already in use. When satisfied the name is unique press the "+ CLICK TO CREATE INSIGHT" button to have the new insight created.
  • The insight is listed in the view and the details page is open. Use the "add meta data" option behind the name to add additional info
  • Assign a severity to the insight. This will determine how it is weighted as well as which color is used to indicate its severity.
  • At this moment, the insight has no assigned patterns yet. You can either enter a simple pattern directly in the Insight itself or click the "Advanced Insights" button to select one or more existing patterns, allowing you to reuse them.
  • To assign an existing pattern simply drag it from the right hand side into the Assigned Pattern box that appears when you click the "Advanced Insights" button.
  • Image Removed Optionally add additional patterns into either the same block (all patterns in one block are evaluated as having an OR relation, meaning that if any pattern in that block returns TRUE the whole block is considered a TRUE - a) or into a new block (all blocks in an insight are evaluated as having an AND relation, meaning that each individual block would need to evaluate to a TRUE for the insight to return a TRUE - b).
    Image Added



Alternatively, you can also copy an insight by clicking the copy option behind the name. This will create a copy of the insight and copies of all the patterns in it. After copying you can then alter the new insight to add or remove patterns and change the name.

...

Note
titleNote

As this copy action will also create new copies of all patterns included in the copied insight it is wise to really think through what is needed. Creating loads of copies of existing patterns might be confusing to manage and it might be better to create a new insight and reuse the existing patterns in combination with your new ones.


Adding system patterns (marked by the panagenda icon) into a custom insight will always result in copies of those system insights being made. It is not possible to add a system pattern directly to a custom insight.

...

.

...


Creating a Ruleset


To create a new ruleset go to the ruleset tab

  • Enter the name for the ruleset to be created. Verify the name isn't already in use and press the "+ CLICK TO CREATE RULESET" button.
  • Update the name and meta data fields if required
  • Select the insights that you want to include in the ruleset
  • Image Removed Enable the ruleset by clicking the red 'Disabled' button in front of the name (it will turn green when enabled)

    Image Added



...

* A regular expression is a special text string for describing a search pattern. More information about Regex can be found on the internet