-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Add line endings and printf debugging section #61947
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
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 refines the Copilot guide by renaming the title, adding a new debugging tips section, and reminding contributors to verify line endings.
- Renames the document header for brevity
- Introduces a “Debugging Tips” section with console.log patterns
- Adds a reminder to ensure consistent CRLF line endings
Comments suppressed due to low confidence (3)
.github/copilot-instructions.md:1
- [nitpick] The new document title is quite generic; consider refining it to reflect the guide’s focus on TypeScript test writing and compiler tests to maintain clarity.
# Guide for Copilot
.github/copilot-instructions.md:287
- [nitpick] The code fence language specifier
ts,diffmay not render correctly in Markdown; consider using a standardtscode fence and marking diffs separately for clarity.
```ts,diff
.github/copilot-instructions.md:327
- The indentation for this bullet appears misaligned, creating an extra nesting level. Align it with the other bullets under “Always format and lint” for consistent formatting.
- Double-check your line endings. Source files in this repo typically use CRLF line endings. Fix all line endings to be consistent before you wrap up
|
|
||
| 6. **Always format and lint** | ||
| - Don't forget to run `npx hereby lint` and `npx hereby format` before you're done | ||
| - Double-check your line endings. Source files in this repo typically use CRLF line endings. Fix all line endings to be consistent before you wrap up |
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.
it's annoying that "run the formatter" is not sufficient here
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.
Are the line endings something that can’t be changed to be same in all files? Or set in gitattributes? You probably would have done it already if it was easy 😅
I know that this document is for Copilot but it’s kinda handy for human developers too. :)
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.
We don't set line endings in .gitattributes because we need to have tests that have differing line endings
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.
.gitattributes works like a .gitignore, so theoretically we could scope it, but I don't know how it'll play with things like autocrlf.
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.
That being said, it seems like practically all tooling wants to emit LF, not CRLF (duh), but switching every file over to LF will probably ruin git blame. But maybe the ignore file can handle that kind of change.
Let's help the robot help itself