https://github.com/superpaintman/exercism-dart
Exercism exercises in Dart
https://github.com/superpaintman/exercism-dart
dart dartlang exercice exercism exercism-dart
Last synced: 10 months ago
JSON representation
Exercism exercises in Dart
- Host: GitHub
- URL: https://github.com/superpaintman/exercism-dart
- Owner: SuperPaintman
- License: mit
- Created: 2017-06-29T04:26:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T09:56:15.000Z (almost 9 years ago)
- Last Synced: 2025-06-07T10:48:20.285Z (about 1 year ago)
- Topics: dart, dartlang, exercice, exercism, exercism-dart
- Language: Dart
- Homepage: https://github.com/exercism/dart
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Exercism Dart Track
[![Linux Build][travis-image]][travis-url]
Exercism exercises in Dart
--------------------------------------------------------------------------------
## How to add new exercise
#### 1. Initialize a new exercise
```bash
# "bob" - this is an example slug
# $ ./tool/create-exercise
$ ./tool/create-exercise bob
```
#### 2. Go to `exercism/` and edit it
```bash
$ cd exercism/bob
# vim / emacs / code / subl / (other editor)
$ vim .
```
#### 3. Add the exercise to `config.json`
Add the exercise to the `config.json` file, by adding an entry to the exercises
array:
```json
{
"slug": "dart",
"language": "Dart",
"repository": "https://github.com/exercism/dart",
"active": true,
"exercises": [
// ...
{
"slug": "bob",
"difficulty": 1,
"topics": [
"Control flow (conditionals)",
"Polymorfism",
"Strings",
"Unicode",
"Pattern recognition",
"Regular expressions"
]
},
// ...
],
// ...
}
```
#### 4. Run tests
```bash
$ pub run test
```
#### 5. Format code
```bash
pub run dart_style:format -l 120 -w .
```
#### 6. Commit and make PR
```bash
$ git checkout -b feature/exercise-bob
$ git commit -am 'Added exercise: bob'
$ git push origin feature/exercise-bob
```
--------------------------------------------------------------------------------
## Code Style
#### Follow the [Dart style guide][dart-style-guide-url]
#### Maximum line length - `120`
#### Exercise dirname in [`kebab-case`][letter-case-url]
```bash
# good
exercises/complex-numbers
# bad
exercises/complex_numbers
exercises/complexNumbers
exercises/complex\ numbers
```
#### Filenames in [`snake_case`][letter-case-url]
```bash
# good
exercises/complex-numbers/lib/complex_numbers.dart
exercises/complex-numbers/test/complex_numbers_test.dart
# bad
exercises/complex-numbers/lib/complex-numbers.dart
exercises/complex-numbers/test/complex-numbers_test.dart
exercises/complex-numbers/lib/complexNumbers.dart
exercises/complex-numbers/test/complexNumbers_test.dart
exercises/complex-numbers/lib/complex\ numbers.dart
exercises/complex-numbers/test/complex\ numbers_test.dart
```
#### Variables / methods / functions in [`camelCase`][letter-case-url]
```dart
// good
void complexNumbers() { }
// bad
void complex_numbers() { }
```
#### Classes in [`PascalCase`][letter-case-url]
```dart
// good
class ComplexNumbers { }
// bad
class complexNumbers { }
class complex_numbers { }
class Complex_numbers { }
```
#### Constatns in [`UPPER_SNAKE_CASE`][letter-case-url]
```dart
// good
const SECRET_ANSWER = 42;
// bad
const secret_answer = 42;
const secretAnswer = 42;
const SecretAnswer = 42;
```
--------------------------------------------------------------------------------
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b feature/exercise-`)
3. Commit your changes (`git commit -am 'Added exercise: '`)
4. Push to the branch (`git push origin feature/exercise-`)
5. Create a new Pull Request
--------------------------------------------------------------------------------
## Contributors
- [SuperPaintman](https://github.com/SuperPaintman) SuperPaintman - creator, maintainer
--------------------------------------------------------------------------------
## License
[MIT][license-url]
[license-url]: https://github.com/SuperPaintman/exercism-dart/blob/master/LICENSE
[travis-image]: https://img.shields.io/travis/SuperPaintman/exercism-dart/master.svg?label=linux
[travis-url]: https://travis-ci.org/SuperPaintman/exercism-dart
[dart-style-guide-url]: https://www.dartlang.org/guides/language/effective-dart/style
[letter-case-url]: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles