Merge pull request #1911 from thughes/presumably
Add presumaby->presumably
diff --git a/.coveragerc b/.coveragerc
index 12579ab..dae3013 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -2,4 +2,4 @@
branch = True
source = codespell_lib
include = */codespell_lib/*
-omit =
+omit = */codespell_lib/tests/*
diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py
index 706805a..343ba66 100755
--- a/codespell_lib/_codespell.py
+++ b/codespell_lib/_codespell.py
@@ -840,7 +840,7 @@
# skip (relative) directories
dirs[:] = [dir_ for dir_ in dirs if not glob_match.match(dir_)]
- else:
+ elif not glob_match.match(filename): # skip files
bad_count += parse_file(
filename, colors, summary, misspellings, exclude_lines,
file_opener, word_regex, ignore_word_regex, context, options)
diff --git a/codespell_lib/data/dictionary.txt b/codespell_lib/data/dictionary.txt
index d1dbe6a..27b36a4 100644
--- a/codespell_lib/data/dictionary.txt
+++ b/codespell_lib/data/dictionary.txt
@@ -14577,8 +14577,8 @@
hesiate->hesitate
hesistant->hesitant
hestiate->hesitate
-heterogenous->heterogeneous
-hetrogenous->heterogeneous
+hetrogeneous->heterogeneous
+hetrogenous->heterogenous, heterogeneous,
heuristc->heuristic
heuristcs->heuristics
heursitics->heuristics
diff --git a/codespell_lib/data/dictionary_rare.txt b/codespell_lib/data/dictionary_rare.txt
index 9c443e3..7f2a8c1 100644
--- a/codespell_lib/data/dictionary_rare.txt
+++ b/codespell_lib/data/dictionary_rare.txt
@@ -63,6 +63,7 @@
guerilla->guerrilla
guerillas->guerrillas
hart->heart, harm,
+heterogenous->heterogeneous
hided->hidden, hid,
hist->heist, his,
hove->have, hover, love,
diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py
index 2e8fd73..52253f8 100644
--- a/codespell_lib/tests/test_basic.py
+++ b/codespell_lib/tests/test_basic.py
@@ -288,10 +288,12 @@
def test_ignore(tmpdir, capsys):
"""Test ignoring of files and directories."""
d = str(tmpdir)
- with open(op.join(d, 'good.txt'), 'w') as f:
+ goodtxt = op.join(d, 'good.txt')
+ with open(goodtxt, 'w') as f:
f.write('this file is okay')
assert cs.main(d) == 0
- with open(op.join(d, 'bad.txt'), 'w') as f:
+ badtxt = op.join(d, 'bad.txt')
+ with open(badtxt, 'w') as f:
f.write('abandonned')
assert cs.main(d) == 1
assert cs.main('--skip=bad*', d) == 0
@@ -305,6 +307,9 @@
assert cs.main('--skip=*ignoredir*', d) == 1
assert cs.main('--skip=ignoredir', d) == 1
assert cs.main('--skip=*ignoredir/bad*', d) == 1
+ badjs = op.join(d, 'bad.js')
+ copyfile(badtxt, badjs)
+ assert cs.main('--skip=*.js', goodtxt, badtxt, badjs) == 1
def test_check_filename(tmpdir, capsys):