Skip to content

Commit

Permalink
CI Check default doctest directives in linter (scikit-learn#17269)
Browse files Browse the repository at this point in the history
* add grep

* directs to test CI

* attempt2

* better output format

* use find

* revert test rst file

* better message

* faster grep
  • Loading branch information
lucyleeow authored May 19, 2020
1 parent 9bc5c1d commit 2d12bb5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build_tools/circle/linting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,14 @@ then
echo $bad_deprecation_property_order
exit 1
fi

# Check for default doctest directives ELLIPSIS and NORMALIZE_WHITESPACE

doctest_directive="$(git grep -nw -E "# doctest\: \+(ELLIPSIS|NORMALIZE_WHITESPACE)")"

if [ ! -z "$doctest_directive" ]
then
echo "ELLIPSIS and NORMALIZE_WHITESPACE doctest directives are enabled by default, but were found in:"
echo "$doctest_directive"
exit 1
fi

0 comments on commit 2d12bb5

Please sign in to comment.