Skip to content

Commit

Permalink
Fix tools/check_wildcard_imports.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gendx committed Mar 27, 2020
1 parent 0170194 commit 77fd805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ci-travis:
@printf "$$(tput bold)* CI: Formatting *$$(tput sgr0)\n"
@printf "$$(tput bold)******************$$(tput sgr0)\n"
@CI=true ./tools/run_cargo_fmt.sh diff
#@./tools/check_wildcard_imports.sh
@./tools/check_wildcard_imports.sh
@printf "$$(tput bold)*************$$(tput sgr0)\n"
@printf "$$(tput bold)* CI: Tools *$$(tput sgr0)\n"
@printf "$$(tput bold)*************$$(tput sgr0)\n"
Expand Down
6 changes: 4 additions & 2 deletions tools/check_wildcard_imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ set -e

# Clippy doesn't have an option for this, so do it manually (see
# https://github.com/rust-lang/rust-clippy/issues/1228).

# Find folders with Cargo.toml files in them and check them (avoids matching
# this script!)
for f in $(find . | grep Cargo.toml); do
# this script!). Use a minimum depth of 2 to avoid matching the workspace's
# Cargo.toml (located in the top-level directory).
for f in $(find . -mindepth 2 | grep Cargo.toml); do
pushd $(dirname $f) > /dev/null
if $(git grep -q 'use .*\*;' -- ':!src/macros.rs'); then
echo
Expand Down

0 comments on commit 77fd805

Please sign in to comment.