Skip to content

Instantly share code, notes, and snippets.

@jasonspick
Created August 13, 2024 21:27
Show Gist options
  • Save jasonspick/7dd3cc39815d26aa93ae6e63494d9581 to your computer and use it in GitHub Desktop.
Save jasonspick/7dd3cc39815d26aa93ae6e63494d9581 to your computer and use it in GitHub Desktop.
PR Checklist
**PR Checklist**
1. **Code Quality**
- Use appropriate naming conventions.
- Remove console errors and debug codes (e.g., `console.log`).
- Eliminate unused variables, functions, or imports.
- Add code comments where necessary.
- Refactor repeated code blocks into reusable functions or traits.
- Organize code files logically and consistently.
2. **Commit Messages**
- Ensure all commit messages are meaningful and informative.
3. **JavaScript**
- Use `useQuery` when applicable.
- Check for the existence of object properties before accessing them.
- Use existing reusable components and break down large components.
- Follow a modular structure.
4. **PHP**
- Promote the use of PHP typing.
- Utilize collections, Laravel Str or Arr helpers, and JS services where applicable.
- Use the Laravel framework appropriately (e.g., `config()` instead of `env()`).
- Check if seeders or helper methods can be used instead of making migrations to update static table values.
- Avoid redundant functions and ensure new functions are necessary.
5. **Database & Migrations**
- Ensure database migrations work properly using `hasColumn` and `hasTable`.
- Optimize tables with indexes or foreign keys; index new columns used in queries.
- Handle value additions to static tables with seeders.
- Evaluate if data alterations or updates in migrations could be better as artisan commands or cron jobs.
- Manage hardcoded values to avoid fatal errors.
6. **Dependencies and Security**
- Assess the necessity and management of new dependencies.
- Ensure secure handling of data and input sanitization to prevent vulnerabilities.
7. **Performance**
- Identify and resolve potential performance issues (inefficient loops, unnecessary queries, memory leaks).
- Consider scalability and efficiency in all aspects.
8. **Code Style & Consistency**
- Avoid unnecessary changes in code placement and spacing, following PSR standards.
- Ensure consistent and meaningful names for classes, functions, and variables.
9. **Exception Handling**
- Use Exceptions and try/catch blocks correctly, ensuring no unhandled exceptions.
10. **Code Review Conduct**
- Approach reviews constructively to improve code quality and understanding, avoiding punitive or judgmental attitudes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment