Ballerina is an open source programming language and platform for cloud-era application programmers to easily write software. It is licensed under the Apache License and is nurtured by all the contributors of the Ballerina community.
nBallerina is a sub project of Ballerina, which facilitates compiling Ballerina code into platform specific native binary.
We appreciate your help!
Please read the Ballerina contribution guide to understand what you need to know to contribute to overall Ballerina project. This specific guide lists any additional points to note when contributing to nBallerina.
For instructions, see Building from source.
-
Do your changes in the source code. Please follow Coding Conventions section when you write code.
-
Add unit tests accordingly. (The build process will automatically execute all the tests.)
-
Commit the changes to your fork and push them to the corresponding original repo by sending a Pull Request (PR).
Tip: Follow these commit message requirements:
- Separate subject from the body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
In short, a properly formed Git commit subject line should always be able to complete the following sentence:
If applied, this commit will [your subject line here]
For more information, go to How to Write a Git Commit Message.
-
Accept the Contributor License Agreement (CLA)
You need to Accept the Ballerina Contributor License Agreement (CLA) when prompted by a GitHub email notification after sending your first Pull Request (PR). Subsequent PRs will not require CLA acceptance.
If the CLA gets changed for some (unlikely) reason, you will be presented with the new CLA text after sending your first PR after the change.
For nBallerina code, we are following LLVM Coding Standards with following changes.
-
Four space indent. Shouldn't use tab character. Most of the IDEs can be configured to replace tab character with 4 spaces.
-
Write your code to fit within 120 columns.
-
CamelCase naming conventions. Elaborate function names, class member names and global variable names. Local variables can be short. Local variables and member variables should start with lowercase letter.
-
Opening brace of classes, functions, loops, and conditional statements should be on the same line.
-
Include following license header in all .h and .cpp files.
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */