Skip to content

Commit

Permalink
Improve pre commit formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseysidorov committed Nov 23, 2020
1 parent 2a043d6 commit db3c3d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
RED='\033[0;31m'
NC='\033[0m' # No Color

# Check that `rustfmt` rules are not violated.
if ! cargo fmt -- --check; then
# Check that formatting rules are not violated.
if ! zk fmt --check; then
echo -e "${RED}Commit error!${NC}"
echo "Please format the code via 'cargo fmt', cannot commit unformatted code"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/zk/src/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ command
.option('--no-reset', 'do not reset the database before test starting')
.allowUnknownOption()
.action(async (cmd: Command, options: string[] | undefined) => {
await db(cmd.reset, ...options || []);
await db(cmd.reset, ...(options || []));
});

command
Expand Down

0 comments on commit db3c3d9

Please sign in to comment.