This repository holds a recommended set of rules for the Best Practice Analyzer of Tabular Editor .
To use these rules, simply download the BPARules.json file from the releases page. Store the file in one of the following locations:
%AppData%\..\Local\TabularEditor
to make the rules available only for you.%ProgramData%\TabularEditor
to make the rules available for everyone on your local machine....and restart Tabular Editor. You should then see the rules show up in Best Practice Analyzer:
The community is encouraged to contribute rules to the collection of Best Practices published here. You can contribute in various ways:
Rules should be submitted in their JSON representation:
{
"ID": string,
"Name": string,
"Category": string,
"Description": string,
"Severity": int,
"Scope": string,
"Expression": string,
"FixExpression": string (optional),
"Remarks": string (optional)
}
Rule ID must be META_ALL_UPPERCASE_WITH_UNDERSCORES, and include the category prefix (see below). Rule Name should be proper case and kept as short as possible, while still describing the essential function of the rule. Rule Description should contain a detailed developer-oriented description of the rule and suggestions on how to fix objects that are catched by the rule. Rule Severity should be an integer between 1 and 5:
You may add Remarks to the rule to provide comments to the community regarding the behaviour and reasoning behind the rule, and also any limitations or exceptions.
Use one of the following values for the Category of the rule:
DIVIDE(<numerator>,<denominator>)
instead of <numerator> / <denominator>
.More categories may be added over time.
Expression is the Dynamic LINQ query that will identify objects in violation of the rule. FixExpression is an optional expression of the form PropertyName = Value
which will be applied to all objects in violation of the rule, if the developer lets the Best Practice Analyzer "fix" the rule.