Skip to content

Instantly share code, notes, and snippets.

@iAmWillShepherd
Created February 22, 2022 16:40
Show Gist options
  • Save iAmWillShepherd/2ba2870a11587d4ede3074cee2e35778 to your computer and use it in GitHub Desktop.
Save iAmWillShepherd/2ba2870a11587d4ede3074cee2e35778 to your computer and use it in GitHub Desktop.
How to ensure dart fomatting guidelines are enforced in your repo.

Using Dart's format command enables you to format all dart files in a project. Setting the --set-exit-if-changed flag will cause the formatter to return an exit code that can be used in CI to pass or fail a build.

$ dart format -o none --set-exit-if-changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment