Skip to content

Commit

Permalink
Add a functional test for the spelling checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 2, 2022
1 parent d9b74d9 commit c89e6ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pylint/checkers/spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class SpellingChecker(BaseTokenChecker):
"default": "fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:",
"type": "string",
"metavar": "<comma separated words>",
"help": "List of comma separated words that should be considered directives if they appear and the beginning of a comment and should not be checked.",
"help": "List of comma separated words that should be considered directives if "
"they appear and the beginning of a comment and should not be checked.",
},
),
)
Expand Down
6 changes: 6 additions & 0 deletions tests/functional/s/spelling/spelling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Functional test for speling.""" # [wrong-spelling-in-docstring]

# mispeled text # [wrong-spelling-in-comment]

def function_name():
"""mispeled text.""" # [wrong-spelling-in-dostring]
2 changes: 2 additions & 0 deletions tests/functional/s/spelling/spelling.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
load-plugins=pylint.checkers.spelling,

0 comments on commit c89e6ec

Please sign in to comment.