Skip to content

Commit

Permalink
docs: fix broken link in error message (fix #234, thanks @hmvp)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Nov 14, 2020
1 parent ab06520 commit 5b1dd68
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 25 deletions.
29 changes: 9 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/nitpick/plugins/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

LOGGER = logging.getLogger(__name__)

TEXT_FILE_RTFD_PAGE = "config_files.html#text-files"
TEXT_FILE_RTFD_PAGE = "plugins.html#text-files"


class TextItemSchema(Schema):
Expand Down
2 changes: 1 addition & 1 deletion src/nitpick/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ class NitpickSectionSchema(BaseNitpickSchema):
class BaseStyleSchema(Schema):
"""Base validation schema for style files. Dynamic fields will be added to it later."""

error_messages = {"unknown": help_message("Unknown file", "config_files.html")}
error_messages = {"unknown": help_message("Unknown file", "plugins.html")}

nitpick = fields.Nested(NitpickSectionSchema)
2 changes: 1 addition & 1 deletion tests/test_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def test_invalid_nitpick_files(offline, request):
).assert_errors_contain(
"""
NIP001 File some_style.toml has an incorrect style. Invalid config:\x1b[32m
xxx: Unknown file. See https://nitpick.rtfd.io/en/latest/config_files.html.\x1b[0m
xxx: Unknown file. See https://nitpick.rtfd.io/en/latest/plugins.html.\x1b[0m
"""
).assert_errors_contain(
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def test_text_configuration(request):
).flake8().assert_errors_contain(
"""
NIP001 File nitpick-style.toml has an incorrect style. Invalid config:\x1b[32m
"abc.txt".contains.0.invalid: Unknown configuration. See https://nitpick.rtfd.io/en/latest/config_files.html#text-files.
"abc.txt".contains.0.invalid: Unknown configuration. See https://nitpick.rtfd.io/en/latest/plugins.html#text-files.
"abc.txt".contains.0.line: Not a valid string.
"def.txt".contains: Not a valid list.
"ghi.txt".whatever: Unknown configuration. See https://nitpick.rtfd.io/en/latest/config_files.html#text-files.\x1b[0m
"ghi.txt".whatever: Unknown configuration. See https://nitpick.rtfd.io/en/latest/plugins.html#text-files.\x1b[0m
""",
1,
)
Expand Down

0 comments on commit 5b1dd68

Please sign in to comment.