Fixed minor typos on CONTRIBUTING.md

This commit is contained in:
Ajith P Venugopal
2018-09-17 17:12:11 +05:30
committed by GitHub
parent 3d95d9a8ee
commit 602332a97c

View File

@@ -22,13 +22,13 @@ Please, take a look at [CODE_OF_CONDUCT](https://github.com/littlevgl/lvgl/blob/
There are few **general rules** There are few **general rules**
* We use [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) * We use [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues)
* Be kind and respectful. Strating with "Hi" is always a good idea :) * Be kind and respectful. Starting with "Hi" is always a good idea :)
* If somebedy helped you give a feedback. * If somebody helped you give a feedback.
* One issue should be about one topic. If you have other questions please open a new issue. * One issue should be about one topic. If you have other questions please open a new issue.
* Always create an issue before creating a [Pull request](https://help.github.com/articles/about-pull-requests/) to discuss the idea first * Always create an issue before creating a [Pull request](https://help.github.com/articles/about-pull-requests/) to discuss the idea first
* Create small, "digestable" Pull requests. * Create small, "digestible" Pull requests.
* Tell your remarks in a structured way. Use paragraphs and the [Markdown](https://guides.github.com/features/mastering-markdown/) support of GitHub. * Tell your remarks in a structured way. Use paragraphs and the [Markdown](https://guides.github.com/features/mastering-markdown/) support of GitHub.
* Be sure you are using the lates version (from `master` branch) * Be sure you are using the latest version (from `master` branch)
* Keep in mind LittlevGL should be and should remain: * Keep in mind LittlevGL should be and should remain:
- usable on small MCUs as well (think about memory footprint) - usable on small MCUs as well (think about memory footprint)
- compilable with "non-standard" tools like Arduino (no gcc specific options) - compilable with "non-standard" tools like Arduino (no gcc specific options)
@@ -43,12 +43,12 @@ If you found a **simple and straightforward bug** like:
* anything else which can be fixed locally with a few lines of code * anything else which can be fixed locally with a few lines of code
* or defective documentation * or defective documentation
then tell then tell:
* where you found the bug (which file/function/variable) * where you found the bug (which file/function/variable)
* how can it cause problem * how can it cause problem
* what is your suggeseted solution if you have * what is your suggested solution if you have
If you faced with **something more clomplex** like: If you faced with **something more complex** like:
* might be simple but you don't know its origin * might be simple but you don't know its origin
* affects a whole file, module or even the architecture * affects a whole file, module or even the architecture
* needs deeper discussion * needs deeper discussion
@@ -57,7 +57,7 @@ then please
* tell what do you experience * tell what do you experience
* tell what do you expect to happen * tell what do you expect to happen
* tell how to reproduce the issue * tell how to reproduce the issue
* provide a simlified code example (better if can be tested with copy-paste) * provide a simplified code example (better if can be tested with copy-paste)
* attache your lv_conf.h (if you feel it's important) * attache your lv_conf.h (if you feel it's important)
* logs and long codes should be attached in a file (instead of copying into a comment) * logs and long codes should be attached in a file (instead of copying into a comment)
@@ -69,16 +69,16 @@ If you have a good and useful idea open issue to tell it! Please note the follow
* Can you help in implementing it? * Can you help in implementing it?
Your suggestion can have 4 possible outcomes: Your suggestion can have 4 possible outcomes:
1. This feature is already exists. In this case you will learn how to achive your goal. 1. This feature is already exists. In this case you will learn how to achieve your goal.
2. You can simply realize it with the current functionality. 2. You can simply realize it with the current functionality.
3. Although it's a new feature but it would break LittlevGL's platform independent and/or resource minimalist nature. 3. Although it's a new feature but it would break LittlevGL's platform independent and/or resource minimalist nature.
4. It's really a new feature which would be good to be in LittlevGL. Hurray! In a discussion we figure out the technical details and implementation options. With the knowledge of how to do it somebody can implement the new feature. 4. It's really a new feature which would be good to be in LittlevGL. Hurray! In a discussion we figure out the technical details and implementation options. With the knowledge of how to do it somebody can implement the new feature.
Keep in mind if you wouldn't like to do the implementation there is no guarantee that it will be ready in the near future. Keep in mind if you wouldn't like to do the implementation there is no guarantee that it will be ready in the near future.
However if you would like to force it, take a look at this page: [Feature request service](http://www.gl.littlev.hu/services#feature) However, if you would like to force it, take a look at this page: [Feature request service](http://www.gl.littlev.hu/services#feature)
## How to implement a feature? ## How to implement a feature?
In [docs/TODO_MINOR.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_MINOR.md) and [docs/TODO_PATCH.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_PATCH.md) you can see some ideas which are waiting for somebody to realize them! If want to deal with a feature from this files, please start an issue and discusse the details. In [docs/TODO_MINOR.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_MINOR.md) and [docs/TODO_PATCH.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_PATCH.md) you can see some ideas which are waiting for somebody to realize them! If want to deal with a feature from these files, please start an issue and discuss the details.
The new feature should be in a new branch. The new feature should be in a new branch.
@@ -88,7 +88,7 @@ The new feature should be in a new branch.
Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/littlevgl/lvgl/blob/master/lv_misc/lv_templ.h) Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/littlevgl/lvgl/blob/master/lv_misc/lv_templ.h)
### Naming conventions ### Naming conventions
* Words are sparated by '_' * Words are separated by '_'
* In variable and function names use only lower case letters (e.g. *height_tmp*) * In variable and function names use only lower case letters (e.g. *height_tmp*)
* In enums and defines use only upper case letters (e.g. *e.g. MAX_LINE_NUM*) * In enums and defines use only upper case letters (e.g. *e.g. MAX_LINE_NUM*)
* Global names (API): * Global names (API):
@@ -100,13 +100,13 @@ Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/lv_misc/l
* prefer `typedef struct` and `typedef enum` instead of `struct name` and `enum name` * prefer `typedef struct` and `typedef enum` instead of `struct name` and `enum name`
* always add a closing *..._t* * always add a closing *..._t*
* Abbreviations: * Abbreviations:
* Use abbreviations on public names only if they become longer then 32 characters * Use abbreviations on public names only if they become longer than 32 characters
* Use only very straightforward (e.g. pos: position) or well established (e.g. pr: press) abbreviatons * Use only very straightforward (e.g. pos: position) or well-established (e.g. pr: press) abbreviations
### Coding guide ### Coding guide
* Functions: * Functions:
* Try to write function shorter then is 50 lines * Try to write function shorter than is 50 lines
* Always shorter then 100 lines (except very straightforwards) * Always shorter than 100 lines (except very straightforwards)
* Variables: * Variables:
* One line, one declaration (BAD: char x, y;) * One line, one declaration (BAD: char x, y;)
* Use `<stdint.h>` (*uint8_t*, *int32_t* etc) * Use `<stdint.h>` (*uint8_t*, *int32_t* etc)
@@ -138,7 +138,7 @@ You should write **why** have you done this:
Short "code summaries" of a few lines are accepted. E.g. `/*Calculate the new coordinates*/` Short "code summaries" of a few lines are accepted. E.g. `/*Calculate the new coordinates*/`
In comments use \` \` when refering to a variable. E.g. ``/*Update the value of `x_act`*/`` In comments use \` \` when referring to a variable. E.g. ``/*Update the value of `x_act`*/``
### Formatting ### Formatting
Here is example to show bracket placing and using of white spaces: Here is example to show bracket placing and using of white spaces:
@@ -149,7 +149,7 @@ Here is example to show bracket placing and using of white spaces:
* @param text '\0' terminated character string. NULL to refresh with the current text. * @param text '\0' terminated character string. NULL to refresh with the current text.
*/ */
void lv_label_set_text(lv_obj_t * label, const char * text) void lv_label_set_text(lv_obj_t * label, const char * text)
{ /* Main bracket of functions in new line*/ { /* Main brackets of functions in new line*/
if(label == NULL) return; /*No bracket only if the command is inline with the if statement*/ if(label == NULL) return; /*No bracket only if the command is inline with the if statement*/