|
| 1 | +When reviewing code, focus on: |
| 2 | + |
| 3 | +## Naming & language |
| 4 | +* Do not use “you” “Your”. Avoid conversational or instructional phrasing. Keep text neutral, concise, and descriptive. |
| 5 | + |
| 6 | +## Security |
| 7 | +- Check for hardcoded secrets, API keys, or credentials |
| 8 | + |
| 9 | +## Formatting |
| 10 | + |
| 11 | +* Follow existing formatting in the repo |
| 12 | +* Use consistent naming |
| 13 | +* Do not introduce formatting tools or config files unless explicitly requested. |
| 14 | + |
| 15 | +## Suggesting changes |
| 16 | + |
| 17 | +When suggesting changes: |
| 18 | + |
| 19 | +* Assume they will be reviewed by humans |
| 20 | +* Optimise for reviewability |
| 21 | +* Keep diffs focused and minimal |
| 22 | +* If a change is non-obvious, add a short comment explaining intent. |
| 23 | +* Comments should explain **why**, not restate **what** the code does |
| 24 | +* Use a neutral, professional tone |
| 25 | +* Avoid humour, sarcasm, or emojis in code comments |
| 26 | + |
| 27 | +## File-specific guidelines |
| 28 | + |
| 29 | +### icon.png/svg |
| 30 | +* SVG is preferred |
| 31 | +* Should be a square icon |
| 32 | +* Less than 100KB in size |
| 33 | + |
| 34 | +### Metadata (metadata.json) |
| 35 | +* displayName - Use the correctly styled/cased official product name for display names, e.g. SharePoint NOT sharepoint |
| 36 | +* description - One short sentence describing what users can build or monitor. Avoid API or implementation language like Access HaloPSA APIs and query ticket data. |
| 37 | + |
| 38 | +### UI Configuration (ui.json) |
| 39 | +- Generally prefer API tokens or OAuth where possible, flag usage of username/password unless the API offers no alternative. |
| 40 | +- Check that only stricly required fields are marked as `required`. Advanced options should never block first-time success. |
| 41 | +- Tooltips - Do not use tooltips unless they add specific value. Never state the obvious (e.g. “Enter the API key here”). |
| 42 | +- Placeholder text - Mandatory for text fields. Use example placeholders (especially for URLs) or “Enter the [data source] [info needed in lowercase]”. Use default values instead of hint text where a value is commonly the same across environments (e.g. default ports). |
| 43 | +- Do not use “you” “Your”. Avoid conversational or instructional phrasing. Keep text neutral, concise, and descriptive. |
| 44 | +* Should not specify the `title` attribute on fields |
| 45 | + |
| 46 | +### Out-of-the-box dashboards (*.dash.json) |
| 47 | +* Dashboard names - Use title case |
| 48 | +* Tile names - Use title case |
| 49 | + |
| 50 | +### Data streams - dataStreams/*.json |
| 51 | +* Display name - Use noun-based names describing the returned data, e.g. Tickets. Avoid verbs such as Get, Fetch, Run, Execute |
| 52 | +* Description - One sentence only. No full stop at the end. Add relevant clarifications in brackets. Never use two sentences. |
| 53 | +* Category - Mandatory. Reuse an existing category from other plugins where possible (e.g. Query). |
| 54 | +* ui |
| 55 | + * Field names - First word uppercase, then lowercase (e.g. “Table name”). Single value: singular. Multiple values: “(s)” (e.g. Tables name(s) |
| 56 | + * Tooltips - Use extremely sparingly. Never state the obvious. Only use when something important must be understood. Start with a verb where possible (e.g. “Supports the ServiceNow filtering definition format”). |
0 commit comments