Rules
What is Trag rule ?
The rule
is plain english instruction which will be applied to code during code review.
Potentially any tribal knowledge within an engineering team, or specific criteria which is impossible to describe as linter, formatter rule can be described as plain English rule
in Trag and it will be applied during the code review process.
In case the rule is not met Trag will write a comment on the pull request. By using rules you can customize the review process according to your coding standards and business requirements and make the review process more relevant to your project’s specific needs.
Tips:
-
Both generic (e.g. follow React state management best practices) and specific (e.g. Prevent the use of innerHTML in JavaScript to avoid XSS attacks. ) rules are ok.
-
Though being more specific drives to more predictable results
-
Rules are instruction on what code should or shouldn’t be rather system instruction to Trag bot how to behave.
-
Providing samples usually help