Skip to content
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

TODO: Extend lint rules for Pylint #50

Open
R1kaB3rN opened this issue Mar 29, 2024 · 4 comments
Open

TODO: Extend lint rules for Pylint #50

R1kaB3rN opened this issue Mar 29, 2024 · 4 comments
Assignees

Comments

@R1kaB3rN
Copy link
Member

R1kaB3rN commented Mar 29, 2024

Related to #48 (comment)

For quality assurance and to prevent bugs such as ac9ddf2, more lint rules should be extended and applied to the Protonfix/gamefix modules.

@R1kaB3rN R1kaB3rN self-assigned this Mar 29, 2024
@Root-Core
Copy link
Contributor

Root-Core commented Mar 29, 2024

If I don't misunderstand you, this is already the case with commit c956ac9, the , adds the files on the root level.

Well, we could just enforce it on all *.py files - without the "static" array.

@R1kaB3rN R1kaB3rN changed the title TODO: Enforce *.py files via the linter TODO: Extend lint rules for Pylint Mar 29, 2024
@R1kaB3rN
Copy link
Member Author

If I don't misunderstand you, this is already the case with commit c956ac9, the , adds the files on the root level.

Sorry, my description was sloppy/inaccurate there. Thanks for the correction.

Well, we could just enforce it on all *.py files - without the "static" array.

Yeah and probably define some files to exclude such as __init__.py for the gamefixes in pyproject.toml

@Root-Core
Copy link
Contributor

No problem. I moved the linked comment here for better discussion. I also expanded it a bit.


We should enforce this via linter:

  • function types
  • single quotes
  • format strings
  • Docstrings for each function (C0116)
  • Docstrings indentation on multiple lines
  • no blank lines after function Docstrings
  • two blank lines between functions
  • a reasonable line length (?)

We want to:

  • Check if there are unused functions
  • Check that GDrive is actually working
  • Split large modules like util.py into smaller ones
  • Enforce linter on all *.py files
  • Handle the complete linter configuration in the pyproject.toml file
  • Remove #pylint: disable=C0103 from gamefixes
  • Have as few pylint exceptions as possible

@R1kaB3rN
Copy link
Member Author

R1kaB3rN commented Apr 15, 2024

I think enforcing rules for Docstrings will require additional tools than pylint. Personally, I'd like to just have one tool for the sake of simplicity.

In addition, there should probably as much tests as possible. In particular for critical files such as fix.py and util.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants