-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
85 lines (85 loc) · 3.48 KB
/
Copy path.coderabbit.yaml
File metadata and controls
85 lines (85 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-ZA"
early_access: false
commands:
enabled: true
linked_issues:
enabled: true
reviews:
profile: "chill"
request_changes_workflow: true
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
base_branches:
- '.*'
path_filters:
- "!build/**"
path_filters:
- "!build/**"
- "!node_modules/**"
- "!vendor/**"
path_instructions:
- path: '**/*.php'
instructions: |
- Follow WordPress coding standards (WPCS) strictly
- Use proper sanitization and validation for all inputs
- Escape all outputs using esc_html, esc_attr, wp_kses_post
- Use WordPress functions instead of native PHP where available
- Add proper DocBlocks with @param, @return, @since tags
- Use meaningful variable and function names with to_reviews_ prefix
- Follow WordPress naming conventions (snake_case for functions/variables)
- path: 'classes/*.php'
instructions: |
- TO Reviews specific: Focus on review management patterns
- Validate review data and ratings before storing
- Implement proper review moderation workflows
- Use WordPress meta fields for review data storage
- Ensure review security (prevent fake reviews, spam)
- Follow Tour Operator plugin integration patterns
- Ensure proper class naming with TO_Reviews_ prefix
- path: 'includes/*.php'
instructions: |
- Check for proper WordPress security measures (nonces, capability checks)
- Ensure functions are properly hooked to WordPress actions/filters
- Validate review submission forms and user permissions
- Review rating calculation and aggregation logic
- Use to_reviews_ function prefix consistently
- Implement proper review display and filtering
- path: 'assets/**/*.{js,ts}'
instructions: |
- Follow WordPress JavaScript coding standards
- Use WordPress script localization for strings and AJAX URLs
- Ensure jQuery compatibility and proper enqueueing
- Add proper error handling for AJAX review submissions
- Implement client-side validation for review forms
- Use modern ES6+ syntax where appropriate
- path: 'assets/**/*.{css,scss}'
instructions: |
- Follow WordPress CSS coding standards
- Use semantic class naming with to-reviews- prefix
- Ensure responsive design for review displays
- Check for accessibility compliance (WCAG 2.1)
- Style star ratings and review forms consistently
- Use CSS custom properties for maintainable theming
- path: 'tests/**'
instructions: |
- Ensure test coverage for critical review functions
- Test review submission, validation, and display
- Test both authenticated and anonymous review scenarios
- Follow WordPress testing best practices
- Use PHPUnit for PHP tests and Playwright for E2E tests
- path: '**/*.md'
instructions: |
- Keep documentation updated with code changes
- Use clear examples for review integration
- Document review moderation and management features
- Include proper installation and configuration steps
- Follow markdown linting rules
- On Pull Requests check for updates to the changelog file
chat:
auto_reply: true