question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pylintrc is not being respected

See original GitHub issue

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the plugin.

Step 2: Describe your environment

  • Plugin version: 0.11.0
  • PyCharm/IDEA version: 2019.1.3
  • Pylint version: 2.3.1

Step 3: Describe the problem:

Steps to reproduce:

  1. Create a .pylintrc file in an arbitrary location. I used the project’s root directory.
  2. Select the file in the plugin’s config screen under “Path to pylintrc”.
  3. Run a scan using the “Scan project” button.

Observed Results:

The scan executes as if no .pylintrc file was provided.

Expected Results:

The scan should respect the configuration from .pylintrc

Relevant Code:

project tree:

image

.pylintrc file:

[MASTER]
ignore=no_pylint_here

Plugin settings:

image

Executing pylint from terminal, .pylintrc is respected:

$ pylint project --rcfile="D:\Python Projects\pylint_plugin_test\.pylintrc"      
************* Module file_to_scan                                                                              
project\file_to_scan.py:1:0: C0304: Final newline missing (missing-final-newline)                              
project\file_to_scan.py:1:1: C0326: Exactly one space required around assignment                               
a=1                                                                                                            
 ^ (bad-whitespace)                                                                                            
project\file_to_scan.py:1:0: C0111: Missing module docstring (missing-docstring)                               
project\file_to_scan.py:1:0: C0103: Constant name "a" doesn't conform to UPPER_CASE naming style (invalid-name)
                                                                                                               
----------------------------------------------------------------------                                         
Your code has been rated at -30.00/10 (previous run: -30.00/10, +0.00)

However, when executing a scan from Pycharm both files are scanned.

image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:13

github_iconTop GitHub Comments

6reactions
pdemarticommented, Feb 10, 2021

FWIW, I figured out a way that seems to work for me:

In the settings of the plugin, there is an “Arguments” option. Use --rcfile /absolute/path/to/pylintrc and now pylintrc is respected.

4reactions
rhjdjongcommented, May 19, 2020

Just ran into the same problem. How about looking into this, instead of having the bot automatically mark it as stale after two months?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable errors in .pylintrc doesn't work in VS Code
Two things: Configuring pylint via pyproject.toml is indeed a hassle, because this specific file only gets respected if pylint is run from ...
Read more >
Pylint features - Pylint 2.16.0-dev documentation
%s should be placed before %s Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)....
Read more >
Using Pylint to Improve the Quality of Your Code - TurboGears
Currently pylint is not easy_install'able but is available in most package ... Still these methods need to be methods, otherwise CherryPy would not...
Read more >
pylint/pylint/config.py - chromium/src/third_party - Git at Google
this program; if not, write to the Free Software Foundation, Inc.,. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """utilities for...
Read more >
Pylint Documentation - Read the Docs
What Pylint says is not to be taken as gospel and Pylint isn't smarter ... respected (standard imports first, then third-party libraries, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found