-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documented coding guidelines and standards for the ACE project #2571
Conversation
Add more documentation for the coding guidelines. 1. Add design considerations 2. Add specifications on code structures, including logging and design 3. Add naming conventions
#2120 contains some stuff as well. |
4 spaces for indentation. | ||
### 1.1. Variable Names | ||
#### 1.1.1. Global Variable naming | ||
All global variables must start with the ACE prefix followed by the component, separated by underscores. Global variables may not contain the fnc_ prefix if the value is not callable code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACE
... fnc
or (whichever is selected should be used on the entire page)
ACE_
... fnc_
Example:</br> | ||
`STR_Balls_Banana`</br> | ||
### 6.9. Initialization expression in for loops | ||
The initialization expression in a for loop will perform no actions other than to initialize the value of a single for loop parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code tags around for
.
Point 8.2. ( https://community.bistudio.com/wiki/createUnit
|
| `LSTRING(banana)` | "STR_ACE_balls_banana"| | ||
| `ELSTRING(balls,banana)` | "STR_ACE_balls_banana"| | ||
### 6.11. GetVariable | ||
When using getvariable, there should either be a default value given in the statement or the return value should be checked for correct data type as well as return value. A default value may not be given after a nil check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using getVariable
, there should either be a default value given in the statement or the return value should be checked for correct data type as well as return value. A default value may not be given after a nil check.
I may have been a bit picky... Overall 2 notes:
|
…nvention Added Private Variable naming conventions to PR #2571
Status? |
Merging this since it's more accurate as the current documentation, though not perfect yet. We will sort out the rest in a different PR so this won't be sitting here forever. |
Documented coding guidelines and standards for the ACE project
Add more documentation for the coding guidelines.
This will still require more discussion and additional documentation to cover more cases.
param
andparams
publicvariable
runAfterSettingsInit
Additionally we could write a checklist for reviewing PRs.