git.delta.rocks / unique-network / refs/commits / cd77dae50bc3

difftreelog

fix code review requests

Grigoriy Simonov2023-09-22parent: #1e4737b.patch.diff
in: master

5 files changed

modified.envrcdiffbeforeafterboth
19 fi19 fi
20}20}
21
22if ! diff .githooks/pre-commit .git/hooks/pre-commit >/dev/null; then
23echo -e "${RED}Hooks are updated, run make git-hooks${RESET}"
24fi
2125
22watch_file .baedeker/.bdk-env/discover.env26watch_file .baedeker/.bdk-env/discover.env
23if test -f .baedeker/.bdk-env/discover.env; then27if test -f .baedeker/.bdk-env/discover.env; then
modified.githooks/pre-commitdiffbeforeafterboth
--- a/.githooks/pre-commit
+++ b/.githooks/pre-commit
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Pre-push hook verifying that inappropriate code will not be pushed.
 
modifiedMakefilediffbeforeafterboth
--- a/Makefile
+++ b/Makefile
@@ -167,3 +167,13 @@
 .PHONY: clippy
 clippy:
 	cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests
+
+.PHONY: git-hooks
+git-hooks:
+	cp .githooks/pre-commit .git/hooks/pre-commit
+
+.PHONY: init
+init:
+	make git-hooks
+	cd tests
+	yarn install
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -159,6 +159,11 @@
 cd tests && yarn eslint --ext .ts,.js src/
 ```
 
+### Enable checking of code style on commits
+```bash
+make git-hooks
+```
+
 
 ## Karura token transfer
 
deletedinit.shdiffbeforeafterboth
--- a/init.sh
+++ /dev/null
@@ -1 +0,0 @@
-git config --local core.hooksPath ./.githooks
\ No newline at end of file