Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.53k stars 1.25k forks source link

Add `pre-commit` tool to the project #1517

Closed amustaque97 closed 2 years ago

amustaque97 commented 2 years ago

Hi team, there is no linter. There is an open-source tool pre-commit that we can add to the project that will help us in linting our project and fixing its related issues. Here is the link to the project https://pre-commit.com/ This tool is used by a lot of repositories and there are a bunch of options we can configure according to our needs.

Repositories:

  1. https://github.com/python/python-docs-es
  2. https://github.com/python/peps
  3. https://github.com/django/django
  4. https://github.com/pallets/flask
  5. https://github.com/pre-commit/pre-commit/network/dependents

If we all agree I can submit a PR to configure this tool with a sample config.

NOTE: I tried it locally once. There are file changes when I run this tool.

Here is the list of changed files:

(venv) ➜  supervisor git:(master) ✗ pre-commit run --all-files
Trim Trailing Whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing docs/xmlrpc.rst
Fixing supervisor/tests/test_states.py
Fixing supervisor/medusa/docs/async_blurbs.txt
Fixing supervisor/tests/fixtures/unkillable_spew.py
Fixing supervisor/medusa/docs/tkinter.txt
Fixing supervisor/medusa/README.txt
Fixing supervisor/scripts/sample_exiting_eventlistener.py
Fixing supervisor/medusa/CHANGES.txt
Fixing supervisor/scripts/sample_eventlistener.py
Fixing supervisor/medusa/docs/data_flow.html
Fixing docs/running.rst
Fixing docs/.static/repoze.css
Fixing supervisor/medusa/docs/proxy_notes.txt

Fix End of Files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing docs/xmlrpc.rst
Fixing supervisor/tests/fixtures/donothing.conf
Fixing supervisor/medusa/filesys.py
Fixing supervisor/tests/test_events.py
Fixing supervisor/tests/test_supervisord.py
Fixing supervisor/scripts/loop_eventgen.py
Fixing supervisor/tests/test_supervisorctl.py
Fixing supervisor/tests/fixtures/issue-836.conf
Fixing supervisor/medusa/LICENSE.txt
Fixing docs/events.rst
Fixing supervisor/tests/fixtures/unkillable_spew.py
Fixing supervisor/web.py
Fixing supervisor/tests/fixtures/issue-638.conf
Fixing supervisor/tests/fixtures/issue-1224.conf
Fixing supervisor/medusa/TODO.txt
Fixing supervisor/medusa/docs/tkinter.txt
Fixing supervisor/tests/fixtures/issue-663.conf
Fixing supervisor/tests/fixtures/issue-1054.conf
Fixing supervisor/tests/fixtures/issue-664.conf
Fixing supervisor/medusa/README.txt
Fixing docs/glossary.rst
Fixing supervisor/scripts/sample_exiting_eventlistener.py
Fixing supervisor/scripts/sample_commevent.py
Fixing supervisor/xmlrpc.py
Fixing supervisor/tests/test_rpcinterfaces.py
Fixing supervisor/tests/test_xmlrpc.py
Fixing supervisor/rpcinterface.py
Fixing supervisor/medusa/counter.py
Fixing supervisor/tests/fixtures/issue-835.conf

Check Yaml...............................................................Passed
Check for added large files..............................................Passed

In a long run, this is going to be helpful. Let me know what do you guys think?

mnaberez commented 2 years ago

I'm not interested in adding pre-commit to the workflow at this time. Thanks for the suggestion.