Rules and profiles
The built-in profiles, the kinds of rule you can write, and how to share or update a profile.
A profile is a ready-made set of rules for one language. You can use it as it is, change it, or add your own rules on top.
Built-in profiles
- PHP (PSR-12 flavoured)
- Python (PEP 8 flavoured)
- JavaScript and TypeScript (common conventions)
- Java
- C#
“Flavoured” means they follow the spirit of the standard, not every line of it.
Rules you can write
- Naming, per kind of name (classes, functions, variables, constants and so on).
- A maximum cyclomatic complexity and a maximum cognitive complexity.
- A maximum function length and a maximum number of parameters.
- A documentation comment required.
- Duplicate code.
- A forbidden import.
- Guidance notes: plain text for people and AI agents to read.
Choosing the level and the place
Each rule is advisory, warning or mandatory, and applies to the whole project, one folder or one file. A more specific rule replaces a wider one only if it says so. Two mandatory rules that disagree are shown as a conflict.
Import, export and updates
- A profile can be exported as text and imported on another computer or project.
- An update to a built-in profile is never applied silently. Revly shows Update to vX and you decide.
History
Changes to rules, levels and profiles are kept in a change history with a hash chain that shows if a row was altered on this computer. It is a tamper-evidence aid, not protection against someone with access to your disk.