GaNDLF icon indicating copy to clipboard operation
GaNDLF copied to clipboard

Some code styling through Ruff for linting

Open Geeks-Sid opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Currently, there is a need for robust linting capabilities within the development environment to ensure code quality and adherence to coding standards. While existing linters offer some level of support, there is a gap in the availability of a comprehensive and efficient Python linter specifically designed for detecting potential security vulnerabilities and bugs.

Describe the solution you'd like I propose integrating Ruff, a powerful Python linter, into the development environment. Ruff is specifically designed to analyze Python code for common security vulnerabilities, performance issues, and coding errors. By incorporating Ruff, developers can benefit from real-time feedback and suggestions to improve code quality and mitigate potential risks.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Integrating Ruff into the development environment would streamline the code review process and enhance the overall security posture of the GaNDLF. Additionally, Ruff's extensibility allows for customization to suit specific project requirements. A seamless integration of Ruff would empower developers to write more secure and reliable Python code.

Geeks-Sid avatar Feb 08 '24 17:02 Geeks-Sid

Stale issue message

github-actions[bot] avatar Apr 08 '24 19:04 github-actions[bot]

@Geeks-Sid - are you still planning to put this in?

sarthakpati avatar Apr 09 '24 01:04 sarthakpati

Sorry for the AWOL. I was not able to get it running without giving write permissions to a bot and therefore it becomes a glorified lint checker. Do you think we should allow bots write permissions to PR?

Geeks-Sid avatar Apr 10 '24 16:04 Geeks-Sid

Do you think we should allow bots write permissions to PR?

I don't think giving it write access is a good idea. However, having this as a check could potentially be of benefit. I am not very familiar with ruff, though. Can you give a high-level overview?

sarthakpati avatar Apr 10 '24 19:04 sarthakpati

Stale issue message

github-actions[bot] avatar Jun 09 '24 19:06 github-actions[bot]

It is just a better linter. I wanted to suggest adding Ruff to our project as Ruff is designed to handle large codebases efficiently, offering significant performance improvements over traditional linters like Flake8 and Pylint or Black. It supports most common linting rules and can be customized to fit our specific needs. By integrating Ruff, we can speed up our development process by catching errors and enforcing code quality standards more quickly. Plus, its simple configuration and extensive documentation make it easy to adopt. Let's consider giving Ruff a try to enhance our code quality and development speed.

Geeks-Sid avatar Jun 13 '24 15:06 Geeks-Sid

Let's consider giving Ruff a try to enhance our code quality and development speed.

I don't have any issue with using any linter as long as we are able to put together a CI checker and an easy way to use this for developers.

Any comments from your end, @VukW, @szmazurek?

sarthakpati avatar Jun 13 '24 18:06 sarthakpati