AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams
MIT License
41 stars 27 forks source link

[proposal] Project lint #23

Closed jairhenrique closed 1 month ago

jairhenrique commented 1 year ago
b-bittner commented 1 year ago

thanks @jairhenrique for this! To be honest, I'm quite new to the linting topic and have to see what it does. But I really appreciate your effort and will look into the code as soon as my free time let me do it. If you like to help me, you could explain it a little bit or post some good pages where I find more details about it. So maybe I'll be a bit faster up to date...

jairhenrique commented 1 year ago

@b-bittner this PR add to ci flow 3 tools for lint code.

  1. ruff - This tool is a rust rewrite effort of various python lint projects such as flake8 and pycodestyle. It basically does code style validations. PEP8 is the basic definition of Python code style.

  2. isort - This tools is used to organize modules imports.

  3. black - This tool is a code formatter, like gofmt, rustfmt.

Also, this pr includes editorconfig to define some generic informations for developer code editor and dependabot a github tool to maintain project dependencies up to date.

b-bittner commented 1 year ago

I've started to have a look at this and think this would be a good way to follow. I'm not quite sure about one thing: does the pipeline reformat the code after a commit automatically, or is ist "just" check and would fail if the commit is not correct? And, as a result of that question: are the formatting changes in this PR a thing you committed or was it done automatically?

jairhenrique commented 1 year ago

I've started to have a look at this and think this would be a good way to follow. I'm not quite sure about one thing: does the pipeline reformat the code after a commit automatically, or is ist "just" check and would fail if the commit is not correct? And, as a result of that question: are the formatting changes in this PR a thing you committed or was it done automatically?

@b-bittner on Makefile I create two commands: lint and format-code. CI pipeline just runs make lint to check code syntax and fails on error.

All changes on source code format was provided by make format-code locally.

b-bittner commented 1 year ago

@jairhenrique I really like the direction you're trying to push this project. But because I'm not (yet) that experienced with this stuff, I would like to bring in this changes in smaller steps. Hopefully you don't mind, that it will not be your commits that will be in the repo. But I will mention you in my commits and in the release-notes.

oniboni commented 1 month ago

@jairhenrique I think everything you suggested is now set up with hatch. If there is still something missing, feel free to ping me :smile_cat: so I can reopen this PR. Thank you for your input!