-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Incorrect reported line #73
Comments
I believe Nitpick is reporting the correct line. 11:45 $ git diff
diff --git a/styles/mypy.toml b/styles/mypy.toml
index 8b7753f..f928725 100644
--- a/styles/mypy.toml
+++ b/styles/mypy.toml
@@ -1,5 +1,5 @@
["setup.cfg".mypy]
-check_untyped_defs = true
+check_untyped_defs = True
ignore_errors = false
ignore_missing_imports = true
strict_optional = true
✔ ~/Desktop/wemake-python-styleguide [master|✚ 1]
11:45 $ flake8 -vvv ./tests/test_version.py 2>&1 | grep -i nip001
flake8.style_guide MainProcess 422 DEBUG Deciding if "NIP001" should be reported
flake8.style_guide MainProcess 422 DEBUG The user configured "NIP001" to be "Ignored.Implicitly", "Selected.Implicitly"
flake8.style_guide MainProcess 422 DEBUG "NIP001" will be "Decision.Selected"
flake8.style_guide MainProcess 422 DEBUG Violation(code='NIP001', filename='./tests/test_version.py', line_number=1, column_number=1, text="File mypy.toml has an incorrect style. Invalid TOML:\x1b[92m\nTomlDecodeError: This float doesn't have a leading digit (line 2 column 1 char 19)\x1b[0m", physical_line='# -*- coding: utf-8 -*-\n') is not inline ignored I don't know what might be happening here. 11:57 $ git diff nitpick-style.toml
diff --git a/nitpick-style.toml b/nitpick-style.toml
index 11b2f8a..0a2643d 100644
--- a/nitpick-style.toml
+++ b/nitpick-style.toml
@@ -3,6 +3,7 @@
[nitpick]
minimum_version = "0.10.0"
+invalid_toml = True
[nitpick.styles]
include = [
(nitpick) ✔ ~/Code/nitpick [develop|✚ 6…1]
11:59 $ flake8
./setup.py:1:1: NIP001 File nitpick-style.toml has an incorrect style. Invalid TOML:
TomlDecodeError: This float doesn't have a leading digit (line 6 column 1 char 153)
Yeah, it's weird, I know. When you explicitly run flake8 on the project files, it reports filename and lines.
I could try to change this default and automatically use the Another solution I once thought is running Nitpick as a standalone CLI command, without the need for
But then the flake8 reporting tools could not be used, nor any of the plugins. I still don't have a solution for all of this, I will think about it. |
@andreoliwa sorry, my intention was not clear: I suggest to report violations on line |
@sobolevn My bad, I was sleepy. |
🎉 This issue has been resolved in version 0.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Expected Behavior
Current Behavior
When you report violations on line
0
they are not bound to any source line.When you report violation on line
1
they are bound to the first line and since this moment--show-source
works incorrectly and report this part:(This is my first line from
./tests/test_version.py
)I would also like to highlight that
./tests/test_version.py
does not hav anything to do with the reported violation. It might create some interesting situations.I know that
flake8
has quite a strange violation reporting API, but can we consider reporting this violation on files likenitpick-style.toml
or similar?The text was updated successfully, but these errors were encountered: