From 312d14eff92a380ae3589529c533094b42ccf419 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Fri, 17 May 2024 01:15:20 +0900 Subject: [PATCH] improve fmt and lint config Signed-off-by: Jun Kimura --- .solhintignore | 1 - Makefile | 9 ++------- foundry.toml | 6 ++++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.solhintignore b/.solhintignore index e923cae5..516c47b1 100644 --- a/.solhintignore +++ b/.solhintignore @@ -1,2 +1 @@ contracts/proto -tests/foundry \ No newline at end of file diff --git a/Makefile b/Makefile index c3ce301d..6b10a1f2 100644 --- a/Makefile +++ b/Makefile @@ -14,16 +14,11 @@ build: .PHONY: fmt fmt: - @$(FORGE) fmt $(FORGE_FMT_OPTS) \ - ./contracts/apps \ - ./contracts/clients \ - ./contracts/core \ - ./contracts/helpers \ - ./tests/foundry/src + @$(FORGE) fmt $(FORGE_FMT_OPTS) .PHONY: lint lint: - @npx solhint 'contracts/{apps,clients,core}/**/*.sol' 'tests/foundry/src/**/*.sol' + @npx solhint 'contracts/**/*.sol' @$(MAKE) FORGE_FMT_OPTS=--check fmt .PHONY: test diff --git a/foundry.toml b/foundry.toml index 439fc2da..36d446d3 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,5 +7,11 @@ gas_reports = ["*"] optimizer = true optimizer_runs = 9_999_999 +[fmt] +ignore = [ + './contracts/proto/**/*.sol', + './tests/**/*.sol' +] + [profile.no_optimization] optimizer = false