Files
sdk/pkg/dev_compiler/tool/format.sh
T
John Messerly 0c148ecef4 Implement modular compilation
Highlights
* compile one module at a time
* use summaries to speed up compiles
* use command runner so we can add more commands later
* some long needed renames and file organization
* various other technical debt has been addressed

Lowlights
* lost node.js runner/tests (node output format still supported)
* possibly lost some closure support/workarounds (format still supported)
* needs more end-to-end tests of the new system

R=vsm@google.com

Review URL: https://codereview.chromium.org/1879373004 .
2016-04-14 11:28:12 -07:00

17 lines
799 B
Bash
Executable File

#!/bin/bash
set -e
# Switch to the root directory of dev_compiler
cd $( dirname "${BASH_SOURCE[0]}" )/..
# Run formatter in rewrite mode on all files that are part of the project.
# This checks that all files are commited first to git, so no state is lost.
# The formatter ignores:
# * local files that have never been added to git,
# * subdirectories of test/ and tool/, unless explicitly added. Those dirs
# contain a lot of generated or external source we should not reformat.
(files=`git ls-files 'bin/*.dart' 'lib/*.dart' test/*.dart test/checker/*.dart \
tool/*.dart | grep -v lib/src/js_ast/`; git status -s $files | grep -q . \
&& echo "Did not run the formatter, please commit edited files first." \
|| (echo "Running dart formatter" ; pub run dart_style:format -w $files))