File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17- # Summary: run multiple checks on the OpenFermion code base.
18- # This is modeled in part on Cirq's check/all script.
17+ # This script is modeled in part on Cirq's check/all script.
1918
2019declare -r usage=" \
2120Usage: ${0##*/ } [--help] [--only-changed-files] [--apply-format-changes] [BASE_REV]
@@ -49,17 +48,17 @@ function error() {
4948
5049# ~~~~ Parse the CLI arguments and gather some data ~~~~
5150
52- declare rev
53- declare apply_arg
54- declare only_changed
51+ declare -a rev=()
52+ declare -a apply_arg=()
53+ declare only_changed= " "
5554for arg in " $@ " ; do
5655 case " ${arg} " in
5756 -h | --help)
5857 echo " ${usage} "
5958 exit 0
6059 ;;
6160 --apply-format-changes)
62- apply_arg=" --apply"
61+ apply_arg=( " --apply" )
6362 shift
6463 ;;
6564 --only-changed-files)
@@ -94,12 +93,12 @@ if [[ -n "${only_changed}" ]]; then
9493 run check/format-incremental " ${rev[@]} " " ${apply_arg[@]} "
9594 run check/pylint-changed-files " ${rev[@]} "
9695else
97- run " check/format-incremental ${rev} ${apply_arg} --all"
98- run " check/pylint"
96+ run check/format-incremental " ${rev[@]} " " ${apply_arg[@]} " --all
97+ run check/pylint " ${rev[@]} "
9998fi
100- run " check/mypy"
101- run " check/pytest-and-incremental-coverage ${rev} "
102- run " check/shellcheck"
99+ run check/mypy
100+ run check/pytest-and-incremental-coverage " ${rev[@] } "
101+ run check/shellcheck
103102
104103# ~~~~ Summarize the results and exit with a status code ~~~~
105104
You can’t perform that action at this time.
0 commit comments