Solutions to various algorithms using the Dart programming language.
by Vince Varga
I decided to implement various algorithms, solve programming challenges and problems, all the while I'm learnign to write idiomatic Dart code and get better at testing in Dart. I used to test everything thoroughly in JavaScript, but didn't really learn the testing libraries in Dart yet.
Based on the things I'm learning here, I write a Dart package for all things data structures and common algorithms. Go to dartsidedev/pop_dart
to figure out where we stand on library front today.
This project uses dartfmt
to idiomatically format Dart source code.
Run dartfmt -w .
before committing to make sure every Dart file is properly formatted.
## Format and fix issues.
$ dartfmt -w .
## Command running in CI.
$ dartfmt -n --set-exit-if-changed .
## See return value of dartfmt. If equals to 1, the build will fail.
$ echo $?
We use dartanalyzer
to run static analysis and a linter on this project.
## Run analyzer and see any issues.
$ dartanalyzer .
## Command running in CI.
$ dartanalyzer --fatal-infos --fatal-warnings .
## See return value of dartanalyzer. If equals to 1, the build will fail.
$ echo $?
This project's analysis_options.yaml
file is taken from the flutter/flutter
project.
Run all tests in the project by executing pub run test .
command.
We use Travis CI to check our code on every push.
bash check