3

I have setup my PyCharm as described in Descriptive flake8 errors in PyCharm . The argument line looks like the following.

$FilePath$ --format='%(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html'

When I run Flake8 in PyCharm, I get the nicely formated text as described.

'C:\Users\XYZ\PycharmProjects\TestProject\test.py:77,80:E501:line too long (106 > 79 characters):https://lintlyci.github.io/Flake8Rules/rules/E501.html'

However, when I click on the error to goto the spot on the code, the link is invalid. For example, the links for above looks like the following.

C:\Users\XYZ\PycharmProjects\TestProject\test.py:77,80:E501:line

If I run the above from the terminal from within PyCharm I get the following output and the links work.

test.py:77,80:E501:line too long (106 > 79 characters):https://lintlyci.github.io/Flake8Rules/rules/E501.html

Any idea on why this is happening?

Community
  • 1
  • 1

2 Answers2

2

For correct output you have to run flake8 command from working directory (project root)

bigEvilBanana
  • 388
  • 2
  • 8
0

The issue was with the argument. The settings should be as follows. Arguments: $FileName$ --format='%(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html'

Working Directory: $ContentRoot$