This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:devel:developmentguidelines [2021/01/06 11:44] joebordes [BEFORE Committing] |
en:devel:developmentguidelines [2021/01/06 12:09] (current) joebordes [Security] |
||
---|---|---|---|
Line 63: | Line 63: | ||
* Strings should be enclosed in SINGLE QUOTES where possible. | * Strings should be enclosed in SINGLE QUOTES where possible. | ||
+ | The [[https://docs.nextcloud.com/server/14/developer_manual/general/codingguidelines.html|Nextcloud coding style is a very sane set of rules also]] | ||
Line 82: | Line 82: | ||
* use vtlib_purify on all incoming and outgoing information | * use vtlib_purify on all incoming and outgoing information | ||
* user Vtiger_Request to construct URLs | * user Vtiger_Request to construct URLs | ||
+ | |||
+ | [[https://docs.nextcloud.com/server/14/developer_manual/general/codingguidelines.html|Read the Nextcloud recommendations]] | ||
===== Commit Guidelines ===== | ===== Commit Guidelines ===== | ||
==== BEFORE Committing ==== | ==== BEFORE Committing ==== | ||
- | This is a list of things that you MUST do before executing a commit: | + | This is a [[https://github.com/tsolucio/corebos/issues/911#issue-719191770|list of things that you MUST do before executing a commit]]: |
* //git diff// check all the files that have been modified, read the diff, and mentally review the change. eliminate debug messages and passwords. | * //git diff// check all the files that have been modified, read the diff, and mentally review the change. eliminate debug messages and passwords. | ||
Line 98: | Line 100: | ||
* If you alter an existing function, did you check if all the existing references to that function will still behave the same way? | * If you alter an existing function, did you check if all the existing references to that function will still behave the same way? | ||
* If you created new code, did you try and use existing functionality as much as possible? | * If you created new code, did you try and use existing functionality as much as possible? | ||
- | * [code formatting|en:devel:developmentguidelines#code_formatting_and_validation_tools] | + | * [[en:devel:developmentguidelines#code_formatting_and_validation_tools|code formatting]] |
- | * Ideally you should run a lint process on both php and javascript. Please look below for the tools we use and how to execute them. I will add it to the Pull Request acceptance process at some point. | + | * Ideally you should run a lint process on both PHP and javascript. Please look below for the tools we use and how to execute them. I will add it to the Pull Request acceptance process at some point. |
* see the checkfile executable below | * see the checkfile executable below | ||
* Did you execute the unit tests and/or e2e tests? | * Did you execute the unit tests and/or e2e tests? | ||
* //git add -p// to separate commits into semantically meaningful chunks. Check if you must separate the code changes in various commits. When I program I usually make some cosmetic changes or modifications that are not related to the requirement I am implementing. You can use the "-p" directive to split unrelated changes creating concise and cohesive commit changes. | * //git add -p// to separate commits into semantically meaningful chunks. Check if you must separate the code changes in various commits. When I program I usually make some cosmetic changes or modifications that are not related to the requirement I am implementing. You can use the "-p" directive to split unrelated changes creating concise and cohesive commit changes. | ||
- | * dedicate a moment to [think about the commit message|en:devel:developmentguidelines#commit_guidelines] | + | * dedicate a moment to [[en:devel:developmentguidelines#commit_guidelines|think about the commit message]] |
* Any documentation that should be added to the wiki? | * Any documentation that should be added to the wiki? | ||