Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong line number for empty-comment message #4009

Closed
orSolocate opened this issue Jan 2, 2021 · 0 comments · Fixed by #4010, tingvarsson/telegram.ongabot#33 or hypothesis/checkmate#227
Closed
Labels

Comments

@orSolocate
Copy link
Contributor

orSolocate commented Jan 2, 2021

Steps to reproduce

  1. create a file with empty comment, for instance:
""" test"""
#
  1. run Pylint with the empty-comment extension Add checker for empty comments #3870

    for example in command line with a file named temp.py:

pylint --load-plugins=pylint.extensions.empty_comment temp.py

  1. Watch Pylint output in the console.

Current behavior

You get the following message output:
temp.py:1:0: R2044: Line with empty comment (empty-comment)

with line number 1.

Expected behavior

You would expect line number 2, i.e with output:
temp.py:2:0: R2044: Line with empty comment (empty-comment)

pylint --version output

pylint 2.6.1-dev1
astroid 2.5.0
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]

running on Windows 10 64-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment