Exercism exercises in Ballerina. Ballerina is a compiled, transactional, statically and strongly typed programming language with textual and graphical syntaxes. Ballerina incorporates fundamental concepts of distributed system integration into the language and offers a type-safe, concurrent environment to implement microservices with distributed transactions, reliable messaging, stream processing, and workflows.
You can install Ballerina by following the Ballerina installation guide.
Thank you so much for contributing! :tada:
Please read about how to get involved in a track. Be sure to read the Exercism Code of Conduct.
We welcome pull requests of all kinds. No contribution is too small.
We encourage contributions that provide fixes and improvements to existing exercises. Please note that this track's exercises must conform to the Exercism-wide standards described in the documentation. If you're unsure about how to make a change, then go ahead and open a GitHub issue, and we'll discuss it.
At the most basic level, Exercism is all about the tests. You can read more about how we think about test suites in the Exercism documentation.
Test files should use the following format:
import ballerina/test;
@test:Config
function testHello() {
test:assertEquals(hello(), "Hello, World!");
}
If you plan to make significant or breaking changes, please open an issue so we can discuss it first. If this is a discussion that is relevant to more than just the Ballerina track, please open an issue in exercism/discussions.
Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's pull request guidelines.
Please follow the coding standards for Ballerina. (If there is a formatter for the track's language, add instructions for using it here.)
Before submitting your pull request, you'll want to verify the changes in two ways:
bin/verify-exercises
Note: you can also verify a single exercise by passing the exercise's slug:
bin/verify-exercises anagram
bin/fetch-configlet
bin/configlet lint
For the Exercism-specific linting, please see the documentation.
To add a new exercise, you can run:
bin/add-exercise <slug>
This will generate all the files for the exercise. Once the script has finished, you then need to:
exercises/practice/<slug>/tests/<snake_name>_test.bal
,
based on the canonical data at https://github.com/exercism/problem-specifications/blob/main/exercises/<slug>/canonical-data.json
exercises/practice/<slug>/.meta/reference/<snake_name>.bal
exercises/practice/<slug>/<snake_name>.bal
authors
array in the exercises/practice/<slug>/.meta/config.json
filedifficulty
value for the exercise's entry in the config.json
filebin/verify-exercises <slug>
Note that: