Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tool/format.sh

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tool/build_sdk.sh ('k') | tool/input_sdk/private/ddc_runtime/classes.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 set -e 2 set -e
3 3
4 # Switch to the root directory of dev_compiler 4 # Switch to the root directory of dev_compiler
5 cd $( dirname "${BASH_SOURCE[0]}" )/.. 5 cd $( dirname "${BASH_SOURCE[0]}" )/..
6 6
7 # Run formatter in rewrite mode on all files that are part of the project. 7 # Run formatter in rewrite mode on all files that are part of the project.
8 # This checks that all files are commited first to git, so no state is lost. 8 # This checks that all files are commited first to git, so no state is lost.
9 # The formatter ignores: 9 # The formatter ignores:
10 # * local files that have never been added to git, 10 # * local files that have never been added to git,
11 # * subdirectories of test/ and tool/, unless explicitly added. Those dirs 11 # * subdirectories of test/ and tool/, unless explicitly added. Those dirs
12 # contain a lot of generated or external source we should not reformat. 12 # contain a lot of generated or external source we should not reformat.
13 (files=`git ls-files 'bin/*.dart' 'lib/*.dart' test/*.dart test/checker/*.dart \ 13 (files=`git ls-files 'bin/*.dart' 'lib/*.dart' test/*.dart test/checker/*.dart \
14 tool/*.dart | grep -v lib/src/js/`; git status -s $files | grep -q . \ 14 tool/*.dart | grep -v lib/src/js_ast/`; git status -s $files | grep -q . \
15 && echo "Did not run the formatter, please commit edited files first." \ 15 && echo "Did not run the formatter, please commit edited files first." \
16 || (echo "Running dart formatter" ; pub run dart_style:format -w $files)) 16 || (echo "Running dart formatter" ; pub run dart_style:format -w $files))
OLDNEW
« no previous file with comments | « tool/build_sdk.sh ('k') | tool/input_sdk/private/ddc_runtime/classes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698