-
Notifications
You must be signed in to change notification settings - Fork 61
fix: improve lint-readme.js error handling and messages #130
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
Conversation
joshjohanning
commented
Oct 2, 2025
- Add check for files tracked in Git but missing from filesystem
- Update error message to distinguish between files and directories
- Prevent crashes when staged files have been deleted locally
- Add fs.existsSync() checks before fs.statSync() calls
📋 Lint Results⚡ ./gh-cli scripts
🔧 ./scripts scripts
Lint results updated at Thu Oct 2 19:09:55 UTC 2025 |
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 improves the robustness of the lint-readme.js script by adding better error handling for missing files and enhancing error messages to distinguish between files, directories, and items that don't exist.
- Adds filesystem existence checks before attempting to access file stats
- Introduces a helper function to determine item types (file/directory/non-existent)
- Updates error messages to be more specific about whether an item is a file or directory
- Prevents crashes when Git-tracked files have been deleted locally
… additional comments
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.