openbook-dex / program

Openbook dex solana program
Apache License 2.0
173 stars 95 forks source link

add rust and js lints #21

Closed Aursen closed 1 year ago

mschneider commented 1 year ago

can you push a complete prettier config file and lint github action? this way formatting changes wont be an issue going forward

Aursen commented 1 year ago

Do you want also a CI lint check ?

mschneider commented 1 year ago

yeah ideally, used this one before https://github.com/blockworks-foundation/mango-ui-v3/blob/main/.github/workflows/node.js.yml

Aursen commented 1 year ago

Ok I added but I cannot test the workflow

mschneider commented 1 year ago

kicked it off

mschneider commented 1 year ago

looks like prettier broke now because of working directory change, it'd be good to manage node & cargo in separate jobs to get parallel execution and not run into cache & memory limits

Aursen commented 1 year ago

Do you want me to put rust fmt and clippy in the tests workflow or I separate in 3: tests, Rust lint, Js lint

mschneider commented 1 year ago

separate is good, so it's easy to see at one glance and also everything runs in parallel

Aursen commented 1 year ago

I hope it will be good now

mschneider commented 1 year ago

sorry, but i think you have a syntax error in one of the yaml files

Aursen commented 1 year ago

Sorry I will fix

silas-x commented 1 year ago

Was going to have a look at these jobs today, but good to see this is in hand! @Aursen, given the use case for prettier is about 5% of the codebase in the test files, suggest splitting into a separate workflow that is only triggered when changing the tests

Aursen commented 1 year ago

I need some help, I'm really not an expert with GitHub actions

silas-x commented 1 year ago

No worries! Lots of good fmt/clippy fixes in this PR. Suggest removing the prettier step and merge the rest? Can pickup tmw.

Aursen commented 1 year ago

Normally everything is good

mschneider commented 1 year ago

hooray!