Skip to content

chore: check formatting on CI #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint

on:
workflow_dispatch:
pull_request:
paths:
- '**.sol'
push:
branches:
- main
paths:
- '**.sol'

env:
FOUNDRY_PROFILE: ci

jobs:
lint:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Check Forge fmt
run: forge fmt --check
id: format
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.compileUsingRemoteVersion": "v0.7.6+commit.7338295f",
"solidity.formatter": "forge"
}
7 changes: 7 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ libs = ["node_modules", "lib"]
via_ir = false
optimizer = true
optimizer_runs = 1000000

[fmt]
ignore = [
# We don't want to change the formatting of our main contracts until the
# migration to Foundry is concluded.
"src/contracts/**/*"
]
7 changes: 0 additions & 7 deletions test/TestNoOp.sol

This file was deleted.

Loading