liquidsoap icon indicating copy to clipboard operation
liquidsoap copied to clipboard

Format code and fix spelling errors

Open jooola opened this issue 2 years ago • 11 comments

To be the one who will annoy on each commit, I propose to add a pre-commit config to format the code and check for spelling errors. This follows #1654.

There is also a CI job that enforce that.

The PR is quiet big, hope you don't mind.

jooola avatar Jun 16 '22 10:06 jooola

This is awesome. Super down to integrate this. Having standardized format helps backport fixes over to rolling releases a lot.

Let us know when this is ready for in depth review!

toots avatar Jun 16 '22 13:06 toots

Cool, I wasn't sure about the interest for this, so I didn't put too much effort.

One thing is bothering me, how could we handle this spelling error: https://github.com/savonet/liquidsoap/blob/ae732a784695fae92d7bac1d165b24b4e39c610f/src/core/io/alsa_io.ml#L92

I guess we have to send this upstream ? Or is this something we can change ?

jooola avatar Jun 16 '22 13:06 jooola

One thing is bothering me, how could we handle this spelling error:

https://github.com/savonet/liquidsoap/blob/ae732a784695fae92d7bac1d165b24b4e39c610f/src/core/io/alsa_io.ml#L92

I guess we have to send this upstream ? Or is this something we can change ?

We are upstream for ocaml-alsa :)

However, this is not a typo: it should be read as "write int" (with int shortened to "n"), and this is the name already taken by the library

smimram avatar Jun 16 '22 14:06 smimram

I think before marking this as ready for review, I would like to let the CI run to check everything is working as expected.

jooola avatar Jun 16 '22 15:06 jooola

I think before marking this as ready for review, I would like to let the CI run to check everything is working as expected.

That's reasonable!

toots avatar Jun 16 '22 15:06 toots

I think before marking this as ready for review, I would like to let the CI run to check everything is working as expected.

That's reasonable!

I was hoping that you could allow the pipeline to run, because I am a first contributor here, and it prevent any pipeline runs.

jooola avatar Jun 16 '22 15:06 jooola

I think before marking this as ready for review, I would like to let the CI run to check everything is working as expected.

That's reasonable!

I was hoping that you could allow the pipeline to run, because I am a first contributor here, and it prevent any pipeline runs.

Launched.

smimram avatar Jun 16 '22 15:06 smimram

Thanks @smimram. @jooola I think you need to resolve the conflicts before the actions can run.

toots avatar Jun 16 '22 15:06 toots

Done

jooola avatar Jun 16 '22 15:06 jooola

I'll work on another branch on my repo so I don't bother you with the workflow approval thing.

jooola avatar Jun 16 '22 17:06 jooola

I will fix the shell scripts in another PR, the main branch moves too fast to keep the branch up to date.

jooola avatar Jun 30 '22 10:06 jooola