Skip to content

Commit

Permalink
Throw error on incorrect cairo linting (#35)
Browse files Browse the repository at this point in the history
* removed autofix for cairo linting

* throw error on incorrect linting

* Differenciate lint from check-lint; Use check-lint in CI

Co-authored-by: Scott Piriou <30843220+pscott@users.noreply.github.com>
  • Loading branch information
Orland0x and pscott authored Feb 18, 2022
1 parent e671572 commit 388d20c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
run: pip install -r requirements.txt

- name: Run linters
run: yarn lint
run: yarn check-format
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
"deploy:l2:testnet": "hardhat starknet-deploy --starknet-network alpha",
"test": "hardhat test",
"start:l1": "hardhat node",
"lint:l1": "prettier --write 'contracts/**/*.sol'",
"lint:l2": "cairo-format contracts/**/*.cairo",
"lint:ts": "eslint . --ext .ts --fix",
"lint": "yarn lint:l1 && yarn lint:l2 && yarn lint:ts"
"format:l1": "prettier --write 'contracts/**/*.sol'",
"check-format:l1": "prettier -c 'contracts/**/*.sol'",
"format:l2": "cairo-format -i contracts/**/*.cairo",
"check-format:l2": "cairo-format -c contracts/**/*.cairo",
"format:ts": "eslint . --ext .ts --fix",
"check-format:ts": "eslint . --ext .ts",
"format": "yarn format:l1 && yarn format:l2 && yarn format:ts",
"check-format": "yarn check-format:l1 && yarn check-format:l2 && yarn check-format:ts"
},
"dependencies": {
"@gnosis.pm/safe-contracts": "^1.3.0",
Expand Down

0 comments on commit 388d20c

Please sign in to comment.