C-Accel-CRIPT / sdk-archive

CRIPT Python SDK
MIT License
11 stars 0 forks source link

Add formater and linters via trunk.io #74

Closed InnocentBug closed 1 year ago

InnocentBug commented 1 year ago

@Ardi028 trunk is free for open-source, so we shouldn't have an issue deploying it here. https://trunk.io/pricing

nh916 commented 1 year ago

I was actually looking for a linter to add to the project before, but I didn't know of any good ones, trunk is pretty great! 🎉

I have 2 small concerns:

  1. I noticed that in the trunk.yaml file there were a few different linters enabled, do we want all of those enabled or do we only want "black" ?
  2. I am a bit anxious to format any .md files because I have noticed that in the past when I was editing .md files and had prettier or other formatters enabled on vscode it would change the formatting on save and the .md files would have issues.
InnocentBug commented 1 year ago

Great, that you like it. I am open to suggestions here, which formaters and linters to use and how there settings are.

These are the suggested ones, for the files we have present in the repo. I would want some kind of formatig for all files in the repo. The main issue of dealing with different formatig styles is agnostic of language. So, that is for me a big plus for using trunk, that it manages all the different linters/formaters.

For your concerns about .md files, I think we should def. have some kind of formating for them. How that looks like, we can decide. I am sure, that we can adjust the settings, that it doesn't destroy the files.

Also if you are using vscode, trunk has a vscode extension that you can use. I don't use vscode, so not useful for me, but it probably makes things smooth for you. I am using old school emacs ;)

InnocentBug commented 1 year ago

I definitely want more than just black. Basically,

    - git-diff-check
    - actionlint@1.6.22
    - black@22.12.0
    - gitleaks@8.15.2
    - isort@5.11.2
    - flake8@6.0.0

Are extermely helpful for me in most cases. Especially, actionlint saves me a lot of time debugging workflows.

And the other are helpful too, even as I don't work as much with them.

nh916 commented 1 year ago

That makes sense!