From a821f61597b8320e8c2d23c60debd6c86c24efb0 Mon Sep 17 00:00:00 2001 From: josojo Date: Tue, 28 Nov 2023 19:58:39 +0100 Subject: [PATCH 1/3] activate checks --- .github/workflows/test.yml | 11 ++--------- .prettierrc | 16 ++++++++++++++++ package.json | 1 + 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 .prettierrc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27a4eb10..260a531e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,13 +50,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ matrix.os }}-yarn- - run: yarn --frozen-lockfile - - run: yarn lint \ No newline at end of file + - run: yarn lint + - run: yarn fmt:check \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..def68ef3 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,16 @@ +{ + "plugins": ["prettier-plugin-solidity"], + "overrides": [ + { + "files": "*.sol", + "options": { + "parser": "solidity-parse", + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + } + ] + } \ No newline at end of file diff --git a/package.json b/package.json index e46a6c2a..80dcc6f6 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "license": "MIT", "scripts": { "fmt": "prettier 'contracts/**/*.sol' -w && prettier 'test/**/*.sol' -w", + "fmt:check": "prettier 'contracts/**/*.sol' -c && prettier 'test/**/*.sol' -c", "lint": "solhint 'contracts/**/*.sol' 'test/**/*.sol'" }, "dependencies": { From 6fc420ad53df5cec74fba6c3eb4f42e683c6d843 Mon Sep 17 00:00:00 2001 From: josojo Date: Tue, 28 Nov 2023 19:58:50 +0100 Subject: [PATCH 2/3] testing checks --- contracts/ForkableBridge.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/ForkableBridge.sol b/contracts/ForkableBridge.sol index 1db89059..63223274 100644 --- a/contracts/ForkableBridge.sol +++ b/contracts/ForkableBridge.sol @@ -161,6 +161,7 @@ contract ForkableBridge is BridgeAssetOperations.mergeChildTokens( token, amount, + wrappedTokenToTokenInfo[token], children[0], children[1] From 559f40699868a82a5578d2492881c46822340620 Mon Sep 17 00:00:00 2001 From: josojo Date: Tue, 28 Nov 2023 20:00:04 +0100 Subject: [PATCH 3/3] remove error that was introduced to check ci --- contracts/ForkableBridge.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/ForkableBridge.sol b/contracts/ForkableBridge.sol index 63223274..1db89059 100644 --- a/contracts/ForkableBridge.sol +++ b/contracts/ForkableBridge.sol @@ -161,7 +161,6 @@ contract ForkableBridge is BridgeAssetOperations.mergeChildTokens( token, amount, - wrappedTokenToTokenInfo[token], children[0], children[1]