Skip to content

Commit 5f0b400

Browse files
committed
Updated contribution file to state Pull-Request policies.
1 parent 13566ae commit 5f0b400

File tree

2 files changed

+100
-93
lines changed

2 files changed

+100
-93
lines changed

CONTRIBUTING.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This project follows Git's classic [Workflow Model](http://nvie.com/posts/a-succ
6262

6363
The parts that consist the model are thoroughly described in the following sections.
6464

65-
#### Bug fixes
65+
#### Bug Fixes
6666
Bug fixes can be found in the *stable* release or in a *developed* feature.
6767
The way we treat them is different, described in the next sections.
6868

@@ -101,10 +101,10 @@ Those are easier to find and fix since they exist only in **feature** branches,
101101

102102
Fixes to such bugs should be made on a separate branch, preferably in a forked version, named after the bug. Once finished, you should PR it to the appropriate **feature** branch. If the **feature** branch has already been merged to **develop**, the merging administrator will take care of merging the branch to develop again.
103103

104-
#### Feature additions
104+
#### Feature Additions
105105
To ensure your contribution makes it into the mainline codebase, always check the **develop** branch for the next targeted release. Make sure your contribution is on par with that branch and PR features back into **develop**. This strategy should be the right one for most users. If you want to make further additions to a feature currently under development, you can also PR into the corresponding **feature** branch.
106106

107-
##### Feature branch naming
107+
##### Feature Branch Naming
108108

109109
**Feature** branch names should be short and descriptive, each word separated by a single hyphen (`-`).
110110
e.g A branch named `feature/blacklisting-libraries-to-avoid-automatic-inclusion-when-reloading-cmake` is a bad branch name because it's too long, even though it's very descriptive. A better name would be `feature/library-blacklist` because it's short and generally descriptive. Any further description would be written in commit messages or the final PR to the **develop** branch.
@@ -125,7 +125,14 @@ There are some strict rules we apply to our releases:
125125
Once the release is complete it is merged to the **master** branch and to the **develop** branch.
126126
A tag with the final release version is also added to the *merge-commit* on **master**.
127127

128-
### Breaking changes
128+
### Pull Requests
129+
130+
As this is GitHub, we support merging by Pull-Requesting. It helps us document code better, as well as discussing and reviewing a change before it gets into the mainline codebase.
131+
So please - Make a Pull Request for every change you'd like to make, yes, even if your'e an administrator or a collaborator.
132+
133+
Also note that we do have a strict rule about the branch your'e PRing from - Once it gets merged, it will be deleted. This is done to avoid unnecessary cluttering of the project. If you need to keep the branch for some reason, please state it in **bold** in the PR's description, so that the merging user will notice it.
134+
135+
### Breaking Changes
129136
Breaking changes require the release of a new major version according to *semver* rules.
130137
So if you are going to make changes to the **public** interface that are not backwards-compatible, make sure it is **absolutely** necessary.
131138

Original file line numberDiff line numberDiff line change
@@ -1,89 +1,89 @@
1-
#=============================================================================#
2-
# _get_board_id
3-
# [PRIVATE/INTERNAL]
4-
#
5-
# _get_board_id(BOARD_NAME BOARD_CPU TARGET_NAME OUTPUT_VAR)
6-
#
7-
# BOARD_NAME - name of the board, eg.: nano, uno, etc...
8-
# BOARD_CPU - come boards has multiple versions with different cpus, eg.: nano has atmega168 and atmega328
9-
# TARGET_NAME - name of the build target, used to show clearer error message
10-
# OUT_VAR - BOARD_ID constructed from BOARD_NAME and BOARD_CPU
11-
#
12-
# returns BOARD_ID constructing from BOARD_NAME and BOARD_CPU, if board doesn't has multiple cpus then BOARD_ID = BOARD_NAME
13-
# if board has multiple CPUS, and BOARD_CPU is not defined or incorrect, fatal error will be invoked.
14-
#=============================================================================#
15-
function(_GET_BOARD_ID BOARD_NAME BOARD_CPU TARGET_NAME OUTPUT_VAR)
16-
if (${BOARD_NAME}.menu.CPUS)
17-
if (BOARD_CPU)
18-
LIST(FIND ${BOARD_NAME}.menu.CPUS ${BOARD_CPU} CPU_INDEX)
19-
if (CPU_INDEX EQUAL -1)
20-
message(FATAL_ERROR "Invalid BOARD_CPU (valid cpus: ${${BOARD_NAME}.menu.CPUS}).")
21-
endif()
22-
else()
23-
message(FATAL_ERROR "Board has multiple CPU versions (${${BOARD_NAME}.menu.CPUS}). BOARD_CPU must be defined for target ${TARGET_NAME}.")
24-
endif()
25-
set(${OUTPUT_VAR} ${BOARD_NAME}.${BOARD_CPU} PARENT_SCOPE)
26-
else()
27-
set(${OUTPUT_VAR} ${BOARD_NAME} PARENT_SCOPE)
28-
endif()
29-
endfunction()
30-
31-
#=============================================================================#
32-
# _get_board_property
33-
# [PRIVATE/INTERNAL]
34-
#
35-
# _get_board_property(BOARD_ID PROPERTY_NAME OUTPUT_VAR)
36-
#
37-
# BOARD_ID - return value from function "_get_board_id (BOARD_NAME, BOARD_CPU)". It contains BOARD_NAME and BOARD_CPU
38-
# PROPERTY_NAME - property name for the board, eg.: bootloader.high_fuses
39-
# OUT_VAR - variable holding value for the property
40-
#
41-
# Gets board property.
42-
# Reconstructs BOARD_NAME and BOARD_CPU from BOARD_ID and tries to find value at ${BOARD_NAME}.${PROPERTY_NAME},
43-
# if not found than try to find value at ${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}
44-
# if not found that show fatal error
45-
#=============================================================================#
46-
function(_GET_BOARD_PROPERTY BOARD_ID PROPERTY_NAME OUTPUT_VAR)
47-
string(REPLACE "." ";" BOARD_INFO ${BOARD_ID})
48-
list(GET BOARD_INFO 0 BOARD_NAME)
49-
set(VALUE ${${BOARD_NAME}.${PROPERTY_NAME}})
50-
if(NOT VALUE)
51-
list(LENGTH BOARD_INFO INFO_PARAMS_COUNT)
52-
if (${INFO_PARAMS_COUNT} EQUAL 2)
53-
list(GET BOARD_INFO 1 BOARD_CPU)
54-
VALIDATE_VARIABLES_NOT_EMPTY(VARS BOARD_CPU MSG "cannot find CPU info, must define BOARD_CPU.")
55-
set(VALUE ${${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}})
56-
endif()
57-
endif()
58-
if (NOT VALUE)
59-
message(FATAL_ERROR "Board info not found: BoardName='${BOARD_NAME}' BoardCPU='${BOARD_CPU}' PropertyName='${PROPERTY_NAME}'")
60-
endif()
61-
set(${OUTPUT_VAR} ${VALUE} PARENT_SCOPE)
62-
endfunction()
63-
64-
#=============================================================================#
65-
# _get_board_property_if_exists
66-
# [PRIVATE/INTERNAL]
67-
#
68-
# _get_board_property_if_exists(BOARD_ID PROPERTY_NAME OUTPUT_VAR)
69-
#
70-
# BOARD_ID - return value from function "_get_board_id (BOARD_NAME, BOARD_CPU)". It contains BOARD_NAME and BOARD_CPU
71-
# PROPERTY_NAME - property name for the board, eg.: bootloader.high_fuses
72-
# OUT_VAR - variable holding value for the property
73-
#
74-
# Similar to _get_board_property, except it returns empty value if value was not found.
75-
#=============================================================================#
76-
function(_try_get_board_property BOARD_ID PROPERTY_NAME OUTPUT_VAR)
77-
string(REPLACE "." ";" BOARD_INFO ${BOARD_ID})
78-
list(GET BOARD_INFO 0 BOARD_NAME)
79-
set(VALUE ${${BOARD_NAME}.${PROPERTY_NAME}})
80-
if(NOT VALUE)
81-
list(LENGTH BOARD_INFO INFO_PARAMS_COUNT)
82-
if (${INFO_PARAMS_COUNT} EQUAL 2)
83-
list(GET BOARD_INFO 1 BOARD_CPU)
84-
VALIDATE_VARIABLES_NOT_EMPTY(VARS BOARD_CPU MSG "cannot find CPU info, must define BOARD_CPU.")
85-
set(VALUE ${${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}})
86-
endif()
87-
endif()
88-
set(${OUTPUT_VAR} ${VALUE} PARENT_SCOPE)
89-
endfunction()
1+
#=============================================================================#
2+
# _get_board_id
3+
# [PRIVATE/INTERNAL]
4+
#
5+
# _get_board_id(BOARD_NAME BOARD_CPU TARGET_NAME OUTPUT_VAR)
6+
#
7+
# BOARD_NAME - name of the board, eg.: nano, uno, etc...
8+
# BOARD_CPU - come boards has multiple versions with different cpus, eg.: nano has atmega168 and atmega328
9+
# TARGET_NAME - name of the build target, used to show clearer error message
10+
# OUT_VAR - BOARD_ID constructed from BOARD_NAME and BOARD_CPU
11+
#
12+
# returns BOARD_ID constructing from BOARD_NAME and BOARD_CPU, if board doesn't has multiple cpus then BOARD_ID = BOARD_NAME
13+
# if board has multiple CPUS, and BOARD_CPU is not defined or incorrect, fatal error will be invoked.
14+
#=============================================================================#
15+
function(_GET_BOARD_ID BOARD_NAME BOARD_CPU TARGET_NAME OUTPUT_VAR)
16+
if (${BOARD_NAME}.menu.CPUS)
17+
if (BOARD_CPU)
18+
LIST(FIND ${BOARD_NAME}.menu.CPUS ${BOARD_CPU} CPU_INDEX)
19+
if (CPU_INDEX EQUAL -1)
20+
message(FATAL_ERROR "Invalid BOARD_CPU (valid cpus: ${${BOARD_NAME}.menu.CPUS}).")
21+
endif()
22+
else()
23+
message(FATAL_ERROR "Board has multiple CPU versions (${${BOARD_NAME}.menu.CPUS}). BOARD_CPU must be defined for target ${TARGET_NAME}.")
24+
endif()
25+
set(${OUTPUT_VAR} ${BOARD_NAME}.${BOARD_CPU} PARENT_SCOPE)
26+
else()
27+
set(${OUTPUT_VAR} ${BOARD_NAME} PARENT_SCOPE)
28+
endif()
29+
endfunction()
30+
31+
#=============================================================================#
32+
# _get_board_property
33+
# [PRIVATE/INTERNAL]
34+
#
35+
# _get_board_property(BOARD_ID PROPERTY_NAME OUTPUT_VAR)
36+
#
37+
# BOARD_ID - return value from function "_get_board_id (BOARD_NAME, BOARD_CPU)". It contains BOARD_NAME and BOARD_CPU
38+
# PROPERTY_NAME - property name for the board, eg.: bootloader.high_fuses
39+
# OUT_VAR - variable holding value for the property
40+
#
41+
# Gets board property.
42+
# Reconstructs BOARD_NAME and BOARD_CPU from BOARD_ID and tries to find value at ${BOARD_NAME}.${PROPERTY_NAME},
43+
# if not found than try to find value at ${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}
44+
# if not found that show fatal error
45+
#=============================================================================#
46+
function(_GET_BOARD_PROPERTY BOARD_ID PROPERTY_NAME OUTPUT_VAR)
47+
string(REPLACE "." ";" BOARD_INFO ${BOARD_ID})
48+
list(GET BOARD_INFO 0 BOARD_NAME)
49+
set(VALUE ${${BOARD_NAME}.${PROPERTY_NAME}})
50+
if(NOT VALUE)
51+
list(LENGTH BOARD_INFO INFO_PARAMS_COUNT)
52+
if (${INFO_PARAMS_COUNT} EQUAL 2)
53+
list(GET BOARD_INFO 1 BOARD_CPU)
54+
VALIDATE_VARIABLES_NOT_EMPTY(VARS BOARD_CPU MSG "cannot find CPU info, must define BOARD_CPU.")
55+
set(VALUE ${${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}})
56+
endif()
57+
endif()
58+
if (NOT VALUE)
59+
message(FATAL_ERROR "Board info not found: BoardName='${BOARD_NAME}' BoardCPU='${BOARD_CPU}' PropertyName='${PROPERTY_NAME}'")
60+
endif()
61+
set(${OUTPUT_VAR} ${VALUE} PARENT_SCOPE)
62+
endfunction()
63+
64+
#=============================================================================#
65+
# _get_board_property_if_exists
66+
# [PRIVATE/INTERNAL]
67+
#
68+
# _get_board_property_if_exists(BOARD_ID PROPERTY_NAME OUTPUT_VAR)
69+
#
70+
# BOARD_ID - return value from function "_get_board_id (BOARD_NAME, BOARD_CPU)". It contains BOARD_NAME and BOARD_CPU
71+
# PROPERTY_NAME - property name for the board, eg.: bootloader.high_fuses
72+
# OUT_VAR - variable holding value for the property
73+
#
74+
# Similar to _get_board_property, except it returns empty value if value was not found.
75+
#=============================================================================#
76+
function(_try_get_board_property BOARD_ID PROPERTY_NAME OUTPUT_VAR)
77+
string(REPLACE "." ";" BOARD_INFO ${BOARD_ID})
78+
list(GET BOARD_INFO 0 BOARD_NAME)
79+
set(VALUE ${${BOARD_NAME}.${PROPERTY_NAME}})
80+
if(NOT VALUE)
81+
list(LENGTH BOARD_INFO INFO_PARAMS_COUNT)
82+
if (${INFO_PARAMS_COUNT} EQUAL 2)
83+
list(GET BOARD_INFO 1 BOARD_CPU)
84+
VALIDATE_VARIABLES_NOT_EMPTY(VARS BOARD_CPU MSG "cannot find CPU info, must define BOARD_CPU.")
85+
set(VALUE ${${BOARD_NAME}.menu.cpu.${BOARD_CPU}.${PROPERTY_NAME}})
86+
endif()
87+
endif()
88+
set(${OUTPUT_VAR} ${VALUE} PARENT_SCOPE)
89+
endfunction()

0 commit comments

Comments
 (0)