-
Notifications
You must be signed in to change notification settings - Fork 157
Pre-commit lint staged only, add yarn test:coverage:file #1172
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1172 +/- ##
=======================================
Coverage 92.83% 92.83%
=======================================
Files 47 47
Lines 2415 2415
Branches 438 438
=======================================
Hits 2242 2242
Misses 173 173
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Avoid potential issues with shell globbing as per CoPilot suggestion. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this 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 adds a new script to run test coverage on a single test file and updates lint-staged commands for better code formatting.
- Adds a new bash script (test-coverage-file) that builds contracts, prepares configuration, and runs Hardhat coverage using a provided test file.
- Updates package.json to include a new test:coverage:file script and adjusts lint-staged commands for Solidity, TypeScript, and JavaScript files.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/contracts/scripts/test-coverage-file | New bash script to run coverage for a provided test file. |
packages/contracts/package.json | Added new test script definition and updated lint-staged commands. |
Comments suppressed due to low confidence (1)
packages/contracts/package.json:107
- [nitpick] Confirm that running both 'prettier' and 'solhint --fix' for Solidity files is necessary, as this may introduce redundancy if one tool fulfills the formatting requirements.
prettier --write
echo "Building contracts before running coverage..." | ||
yarn build | ||
|
||
echo "{}" > addresses-local.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding cleanup of the 'addresses-local.json' file after test execution to avoid leaving residual files or accidental commits.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmigone I think leaving the file is a designed feature of how other scripts work, so I am not going to change this unless you suggest I should.
I realise that although I thought I was using the same tools currently in use for linting, the way I configured it might not conform to eslint-graph-config. I am going to check that first. |
Okay, seems actually this is aligned with the direction taken in prettier, it is eslint we are not using it for. |
No description provided.