Skip to content

Commit

Permalink
Check import sorting before checking headers.
Browse files Browse the repository at this point in the history
The header check includes an import check for __future__ imports.  Its
easier to understand / correct issues with headers that have
non-compliant import sorting for the __future__ imports if the isort
check runs first, fails, and suggests running
`./build-support/bin/isort -f`.

Testing Done:
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/51586487

Bugs closed: 1147, 1148

Reviewed at https://rbcommons.com/s/twitter/r/1812/
  • Loading branch information
jsirois committed Feb 21, 2015
1 parent 2cb4ddc commit 3bd9c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-support/bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ if [[ "${skip_formatting_checks:-false}" == "false" ]]; then
banner "Checking python code formatting"

./build-support/bin/check_packages.sh || exit 1
./build-support/bin/check_header.sh || exit 1
./build-support/bin/isort.sh || \
die "To fix import sort order, run \`build-support/bin/isort.sh -f\`"
./build-support/bin/check_header.sh || exit 1
fi

# TODO(John sirois): Re-plumb build such that it grabs constraints from the built python_binary
Expand Down

0 comments on commit 3bd9c61

Please sign in to comment.