Bug 477021

Summary: Cannot supply a setup.cfg file when analyzing python code with Flake8
Product: [Applications] kate Reporter: jules.bouton
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal CC: christoph, jules.bouton, waqar.17a
Priority: NOR    
Version First Reported In: 21.12.3   
Target Milestone: ---   
Platform: Mint (Debian based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description jules.bouton 2023-11-14 22:15:11 UTC
SUMMARY

When analyzing a python code with flake8 in the integrated plugin, I cannot pass any extra argument to flake8.
Usually this is done through a setup.cfg file. However, even when adding such a file to the project, there is no change.

STEPS TO REPRODUCE
1.  Install flake8
2.  Open a simple .py file, with at least one line longer than 79 columns.
3.  Create a setup.cfg file with following content :
``` 
[flake8]
max-line-length = 99
```
4. Analyze the code with flake8 in the integrated plugin.

OBSERVED RESULT

Flake8 is still displaying errors for lines longer than 79 instead of 99.

EXPECTED RESULT

Flake8 should use any existing setup.cfg file and read the arguments. Otherwise there should be an option to pass extra arguments to flake8 in Kate config panel.

SOFTWARE/OS VERSIONS
Linux : Mint 21.2
KDE Plasma Version: 5.24.7 
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

* I guess this should be set in this file : https://invent.kde.org/utilities/kate/-/blob/master/addons/project/tools/flake8.cpp
* See here for the config files of flake8 : https://flake8.pycqa.org/en/latest/user/configuration.html
Comment 1 Christoph Cullmann 2025-01-05 20:04:22 UTC
Should flake8 not itself locate the next matching config file during the scan?
Comment 2 Waqar Ahmed 2025-01-13 11:49:36 UTC
This is something that we need to support for all analyzers. There is no way to change things and this makes working with some analyzers  annoying