# Code Review Guidelines

**General rules - Mandatory**

1. All the branches/commits should be associated with JIRA ID.
2. No direct pushes to develop/ branch - raise PR from feature branch -> develop, code reviewed , then merge to develop.
3. Merge develop to master when ready for production by creating PR from develop -> master
4. Remove direct push access to develop and master.
5. When creating a pull request, move jira status -> code review -> assign to code reviewer(peer reviews also can be done)&#x20;
6. Test the primary functionality of the PR is working.
7. Understand the context of the user story and its impact.
8. Once review comments are passed, PR is merged, move JIRA status -> done
9. Clean up feature branches as and when required.
10. Master should be always up-to-date with production code.
11. Release branches / release tagging should be followed (particularly for mobile projects).
12. For big features, create a feature branch and create small branches from that feature branch and merge them in feature branch so at the end one feature branch will be merged to develop.
13. Try to create smaller branches and smaller PRs, so that code reviewing will be easy.
14. Commit messages should be relevant to what is done in the code.

```
git commit -m "[XDS-100] - please use this format for commit messages"
```

&#x20; 14.Naming Convention of branches:

1. feature/featureName
2. bug/bugName
3. hotfix/hotfixName
4. release/releaseName
5. Use "WIP" for branches with Work in Progress.

**Tech Specific -** Coding standards, architecture guidelines

**iOS**:

1. Unit tests
2. Fix warnings - IDE warnings
3. Linting tool warnings/errors fixed for code standards and code quality (swiftlint for iOS)

**Android:**

**PHP**:

1.PRs should pass Sonar Cloud quality analysis

**JAVA**:

1.PRs should pass Sonar Cloud quality analysis


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs2.ekar.io/scrum-guidelines-best-practices/code-review-guidelines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
