Skip to content
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

fix: Fixing issues with lint #1687

Merged
merged 3 commits into from
Apr 15, 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
16 changes: 7 additions & 9 deletions .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ jobs:
ci_run zk
ci_run zk db migrate

- name: Lints - DISABLED (EVM-560)
- name: Lints
run: |
ls

# ci_run zk fmt --check
# ci_run zk lint rust --check
# ci_run zk lint js --check
# ci_run zk lint ts --check
# ci_run zk lint md --check
# ci_run zk db check-sqlx-data
ci_run zk fmt --check
ci_run zk lint rust --check
ci_run zk lint js --check
ci_run zk lint ts --check
ci_run zk lint md --check
ci_run zk db check-sqlx-data


3 changes: 2 additions & 1 deletion infrastructure/zk/src/fmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Command } from 'commander';
import { formatSqlxQueries } from './format_sql';
import * as utils from './utils';

const EXTENSIONS = ['ts', 'md', 'sol', 'js'];
const EXTENSIONS = ['ts', 'md', 'js'];
const CONFIG_PATH = 'etc/prettier-config';

function prettierFlags(phaseName: string) {
Expand All @@ -16,6 +16,7 @@ export async function prettier(extension: string, check: boolean = false) {

const command = check ? 'check' : 'write';
const files = await utils.getUnignoredFiles(extension);
console.log(`Got ${files.length} files for ${extension}`);

if (files.length === 0) {
console.log(`No files of extension ${extension} to format`);
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/zk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const IGNORED_DIRS = [
'system-contracts',
'artifacts-zk',
'cache-zk',
'contracts/l1-contracts/lib'
// Ignore directories with OZ and forge submodules.
'contracts/l1-contracts/lib',
'contracts/l1-contracts-foundry/lib'
];
const IGNORED_FILES = ['KeysWithPlonkVerifier.sol', 'TokenInit.sol', '.tslintrc.js', '.prettierrc.js'];

Expand Down
Loading