software-mansion / starknet.py

✨ 🐍 Python SDK for Starknet.
https://starknetpy.rtfd.io/
MIT License
258 stars 80 forks source link

Check cairo contracts formatting #1460

Closed franciszekjob closed 1 month ago

franciszekjob commented 1 month ago

Closes #1457

Introduced changes

Check cairo contracts formatting using scarb fmt --check

franciszekjob commented 1 month ago

Would it be possible to add some kind of message why compiling failed? I suppose that it can be difficult to recognize the reason for test failure without a message. Especially when you are new to a project or external contributor

I had it on my mind, but I decided to leave it with default formatting error that scarb displays (same when compilation fails due to any error, we don't handle it in script). Wdyt @kkawula ? Don't have a strong opinion though.

kkawula commented 1 month ago

Would it be possible to add some kind of message why compiling failed? I suppose that it can be difficult to recognize the reason for test failure without a message. Especially when you are new to a project or external contributor

I had it on my mind, but I decided to leave it with default formatting error that scarb displays (same when compilation fails due to any error, we don't handle it in script). Wdyt @kkawula ? Don't have a strong opinion though.

Hmm, I suppose that it will be helpful to at least add info about start of format checking, because at first look I don't know why this compilation failed gh job. Some kind of Checking contracts formatting message

franciszekjob commented 1 month ago

Would it be possible to add some kind of message why compiling failed? I suppose that it can be difficult to recognize the reason for test failure without a message. Especially when you are new to a project or external contributor

I had it on my mind, but I decided to leave it with default formatting error that scarb displays (same when compilation fails due to any error, we don't handle it in script). Wdyt @kkawula ? Don't have a strong opinion though.

Hmm, I suppose that it will be helpful to at least add info about start of format checking, because at first look I don't know why this compilation failed gh job. Some kind of Checking contracts formatting message

Sure, message that format checking has started will be helpful, added 👍