Add line endings and printf debugging section#61947
Add line endings and printf debugging section#61947RyanCavanaugh merged 1 commit intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
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.
it's annoying that "run the formatter" is not sufficient here
There was a problem hiding this comment.
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.
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.
.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.
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