Skip to content

Commit 39482e0

Browse files
committed
Raise exception if output.txt is not empty
1 parent a2fe8b9 commit 39482e0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/make.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ def zip_html(self):
308308
def spellcheck(self):
309309
"""Spell check the documentation."""
310310
self._sphinx_build('spelling')
311+
output_location = os.path.join('build', 'spelling', 'output.txt')
312+
with open(output_location) as output:
313+
lines = output.readlines()
314+
if lines:
315+
raise SyntaxError(
316+
'Found misspelled words.'
317+
' Check pandas/doc/build/spelling/output.txt'
318+
' for more details.')
311319

312320

313321
def main():

doc/source/spelling_wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ numpy
44
NumPy
55
Reindexing
66
reindexing
7+
ga
8+
fe
79
reindexed
810
Histogramming
911
histogramming

0 commit comments

Comments
 (0)