Comments (10)
dartfmt
has an option to do a dry run and set the exit code to 1 if there are changes. That might be a good option.
from dart.
@jvarness We ran it via the check_formatting scripting, so it runs on all platforms.
from dart.
@Stargator if your environment has the dart sdk installed though, won't it have dartfmt
installed by default? Are there installations that don't include dartfmt
?
from dart.
@jvarness You are right, the script allows checks the formatting of the config.json. So instead of a single line for each command we rolled similar commands together in the check_formatting.dart and the presubmit.dart scripts.
from dart.
We're not set in stone, but we wanted to run one script versus two commands to check formatting of the project and the config file. Anyone that wants this, can take it. I'm trying to wrap up a few things I had on the back burner.
from dart.
@Stargator if your environment has the dart sdk installed though, won't it have dartfmt installed by default? Are there installations that don't include dartfmt?
An additional point to make is that the SDK has a set version of the dartfmt package (dart_style). So if you want a newer version you'd have to run pub global activate dart_style
. So if we add that to the script, then it would more justify manually running the dartfmt executable since it would follow updating the global package version.
from dart.
@Stargator I've been working on this but I've hit some snags.
Looks like the Dart runner for Travis doesn't honor when exit codes are set within a Dart script. I'll need to investigate a little more and get back to you.
I figured out how to make formatting fail and how to run all the tests, but there's weird stuff happening with setting exit codes.
from dart.
I've experienced this with Jenkins. I resolved it by throwing an error when the exit code was non-zero.
from dart.
Throwing the error is fine, but after rebasing with master, it looks like the jobs are now stalling when the formatting of all the files is checked:
https://travis-ci.org/jvarness/dart
from dart.
Resolved in #129
from dart.
Related Issues (20)
- Add or Update existing GitHub Action to check for bad links HOT 7
- Should the template for "Isbn Verifier" have a class? HOT 1
- Replace all dartlang.org links with dart.dev
- Does ABOUT.md Need a Mention of Flutter? HOT 3
- Configure Online Editor Task Complete
- Make Test Driven Development More Prominent in Exercise Instructions HOT 4
- Dart tests are default on skip:true HOT 1
- Structure of test files for generated exercises? HOT 12
- How to best run tests locally on just the exercise being worked on? HOT 5
- Question about initialization in test suites HOT 6
- dart fix is removing import in test suite HOT 5
- [CI] Re-enable link checker HOT 11
- Drop use of types for variables when not necessary HOT 1
- Armstrong Numbers: do we want to add BigInt? HOT 3
- Syntax question -- lists, and types and lists of lists HOT 2
- Why is skip true for all the tests? HOT 2
- Gigasecond method name could be changed HOT 2
- Wide right section cause layout issues HOT 2
- Deprecate `beer song`? HOT 1
- I noticed all the testcases except first one are marked for skip. Any reasons ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart.