xermicus / revive

Solidity compiler for PolkaVM
Apache License 2.0
16 stars 4 forks source link

chore: added code formating target #8

Closed 0xf333 closed 4 months ago

0xf333 commented 4 months ago

Description

Since 'make test' is frequently used during development, adding the codebase formatting target as a prerequisite to it, will help maintain consistency in the codebase more easily.

Usage

During testing, formatting will automatically be applied

make test

Or

If you only want to format the codebase without running the tests, you should just run:

make format
0xf333 commented 4 months ago

@xermicus

0xf333 commented 4 months ago

Good idea however can we just --check instead of applying? This way executing tests won't potentially change source code (which is a very unexpected thing to do for tests). Also I'm about to add basic CI jobs where we want to re-use the Makefile targets, and with --check it'll be directly reusable since it returns non-zero exit code if it finds unformatted code.

@xermicus I see what you mean. Commit pushed with the suggested change