Skip to content

Conversation

@RembrandtK
Copy link
Contributor

@RembrandtK RembrandtK commented Nov 14, 2025

With all lint issues were addressed it became apparent the lint GH workflow had two issues:

  1. Did not fail on warnings: The workflow used continue-on-error with exit code capture via $?, but $? was always 0 because continue-on-error prevents failures. Fixed by checking step outcomes in a final verification step.

  2. Different results than local linting: CI ran linters from repo root while local 'pnpm lint' runs per-package scripts from package directories. This caused Solhint's import-path-check rule to produce false warnings in CI. Fixed by running Solhint from each package directory using 'pnpm -r exec'.

Additional improvements:

  • Use git ls-files instead of globs to only lint tracked files (much faster)
  • Exclude Ignition/build artifacts from JSON linting (939 → 102 files, 89% reduction)
  • Add --no-warn-ignored to ESLint to suppress ignore pattern warnings
  • Add --no-error-on-unmatched-pattern to Prettier to handle symlinks gracefully
  • Simplify workflow structure with fewer, clearer steps

Also fixed YAML syntax warning in build-test.yml (removed redundant branches filter).

Added fixes for linting issues introduced on main in interim period prior to globalling fixing lint issues.

Added ignore of .claude/ in .gitignore.

…on warnings

The lint workflow had two critical issues:

1. **Did not fail on warnings**: The workflow used continue-on-error with exit
   code capture via $?, but $? was always 0 because continue-on-error prevents
   failures. Fixed by checking step outcomes in a final verification step.

2. **Different results than local linting**: CI ran linters from repo root while
   local 'pnpm lint' runs per-package scripts from package directories. This
   caused Solhint's import-path-check rule to produce false warnings in CI.
   Fixed by running Solhint from each package directory using 'pnpm -r exec'.

Additional improvements:
- Use git ls-files instead of globs to only lint tracked files (much faster)
- Exclude Ignition/build artifacts from JSON linting (939 → 102 files, 89% reduction)
- Add --no-warn-ignored to ESLint to suppress ignore pattern warnings
- Add --no-error-on-unmatched-pattern to Prettier to handle symlinks gracefully
- Simplify workflow structure with fewer, clearer steps

Also fixed YAML syntax warning in build-test.yml (removed redundant branches filter).
@RembrandtK RembrandtK requested a review from Copilot November 14, 2025 18:14
Copilot finished reviewing on behalf of RembrandtK November 14, 2025 18:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes critical issues in the lint workflow that prevented it from properly failing on errors and caused inconsistent results between CI and local linting. The main improvements are:

  • Fixed the continue-on-error mechanism by checking step outcomes instead of exit codes
  • Aligned CI linting with local behavior by running Solhint from package directories using pnpm -r exec
  • Improved performance by using git ls-files instead of globs and excluding build artifacts from JSON linting (89% reduction in files checked)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
.github/workflows/lint.yml Refactored workflow to consolidate linting steps, fix failure detection via step outcomes, run Solhint from package directories to match local behavior, and optimize file discovery with git ls-files
.github/workflows/build-test.yml Removed redundant branches: '*' filter to fix YAML syntax warning

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… scripts

- Add proper interfaces for artifact structure in decode-creation-args.ts
- Replace any[] with typed tuple for event args in read-immutables-from-event.ts
- Fixes all pnpm lint:ts warnings
- Add -r flag to all xargs commands to handle empty input gracefully
- Add || true to grep commands to prevent exit code 1 when no matches
- Add error handling when no package.json found for Solidity files
- Ensures workflow doesn't fail on edge cases with empty file lists
- Fails with error if package.json not found (unexpected condition)
@RembrandtK RembrandtK self-assigned this Nov 14, 2025
@RembrandtK RembrandtK requested a review from Copilot November 14, 2025 18:31
Copilot finished reviewing on behalf of RembrandtK November 14, 2025 18:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.06%. Comparing base (380f6ad) to head (6575639).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1254   +/-   ##
=======================================
  Coverage   84.05%   84.06%           
=======================================
  Files          42       42           
  Lines        2070     2071    +1     
  Branches      615      615           
=======================================
+ Hits         1740     1741    +1     
  Misses        330      330           
Flag Coverage Δ
unittests 84.06% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Address PR feedback:
- Replace xargs -r (GNU-specific) with tr/xargs -0 for cross-platform compatibility
- Add empty-file handling to prevent stdin processing
- Add consistent messaging for all file-type scenarios

The xargs -r flag is a GNU extension not available on BSD/macOS.
Using null-delimited input (tr '\n' '\0' | xargs -0) is POSIX-compliant
and works across all platforms.
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddebug@​4.4.310010010084100
Addedhardhat@​2.26.394100919780

View full report

@RembrandtK RembrandtK requested a review from Copilot November 17, 2025 15:27
Copilot finished reviewing on behalf of RembrandtK November 17, 2025 15:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RembrandtK RembrandtK marked this pull request as ready for review November 17, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants