-
-
Notifications
You must be signed in to change notification settings - Fork 400
feat: Add htmlhint --init
command
#1630
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
Merged
Merged
+147
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This creates a new config (if one doesn't already exist)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1630 +/- ##
===========================================
+ Coverage 96.99% 100.00% +3.00%
===========================================
Files 2 1 -1
Lines 1628 1 -1627
Branches 335 0 -335
===========================================
- Hits 1579 1 -1578
+ Misses 49 0 -49 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…t practices Updated behavior: Exit code 0 (success): ✅ Config file created successfully ✅ Config file already exists (no action needed, but not an error) Exit code 1 (failure): ❌ File creation failed due to write permissions, disk space, etc. Why this is better: Follows CLI conventions: Failed operations should exit with non-zero codes Better for scripting: Scripts can check $? or $LASTEXITCODE to handle errors More user-friendly: Existing file is treated as success, not failure Proper error handling: Real write errors are properly reported Updated tests: ✅ All tests pass ✅ Tests verify correct exit codes for each scenario ✅ Tests handle platform differences (Windows vs Unix) This change makes the --init command much more robust and follows standard CLI best practices.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO: