Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/b4/ez.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
except ModuleNotFoundError:
can_gfr = False

try:
import codespell_lib
can_codespell = True
except ModuleNotFoundError:
can_codespell = False

logger = b4.logger

MAGIC_MARKER = '--- b4-submit-tracking ---'
Expand Down Expand Up @@ -1808,7 +1814,8 @@ def get_check_cmds() -> Tuple[List[str], List[str]]:
if topdir:
checkpatch = os.path.join(topdir, 'scripts', 'checkpatch.pl')
if os.access(checkpatch, os.X_OK):
ppcmds = [f'{checkpatch} -q --terse --no-summary --mailback --showfile']
spell = "--codespell" if can_codespell else ""
ppcmds = [f'{checkpatch} -q --terse --no-summary --mailback --showfile {spell}']

# TODO: support for a whole-series check command, (pytest, etc)
return ppcmds, scmds
Expand Down