Skip to content

Added warning at the top of the generated typescript file that it is generated#4

Merged
tjcouch-sil merged 2 commits into
mainfrom
add-generated-warning
Dec 17, 2025
Merged

Added warning at the top of the generated typescript file that it is generated#4
tjcouch-sil merged 2 commits into
mainfrom
add-generated-warning

Conversation

@tjcouch-sil
Copy link
Copy Markdown
Member

@tjcouch-sil tjcouch-sil commented Dec 17, 2025

This change is Reviewable

Copy link
Copy Markdown

@irahopkinson irahopkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irahopkinson reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @lyonsil and @tjcouch-sil)


src/generate-markers-map.ts line 129 at r1 (raw file):

    // Figure out the line endings and add the generated warning at the top
    const lineEnding = markersMapModelContent.includes('\r\n') ? '\r\n' : '\n';

Any file that is committed in any of our repos should all have line endings of \n so that they work on any OS without causing odd repo conflicts. Typically even on Windows we should checkout as \n also since Windows copes fine with that. These generated files are committed aren't they?

Copy link
Copy Markdown
Member Author

@tjcouch-sil tjcouch-sil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @irahopkinson and @lyonsil)


src/generate-markers-map.ts line 129 at r1 (raw file):

Previously, irahopkinson (Ira Hopkinson) wrote…

Any file that is committed in any of our repos should all have line endings of \n so that they work on any OS without causing odd repo conflicts. Typically even on Windows we should checkout as \n also since Windows copes fine with that. These generated files are committed aren't they?

There is a lot to say about this topic, but here are the biggest things I think of around this topic:

  1. We didn't have a .gitattributes in this repo, so the files were CRLF on Windows and LF otherwise iirc
  2. I just added a .gitattributes dictating the files in this repo should be LF everywhere assuming someone hasn't set their git settings to force using CRLF
  3. The source file in question is in this repo, but the file generated is not committed to this repo and is not necessarily only to be placed in our repos. I thought there were enough variables to warrant keeping it simple and following whatever line endings the file already has. I'd rather be consistent than accidentally use two different kinds of line endings in the same file
  4. It's not really that important

Copy link
Copy Markdown

@irahopkinson irahopkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@irahopkinson reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lyonsil)

@tjcouch-sil tjcouch-sil merged commit e33ce54 into main Dec 17, 2025
3 checks passed
@tjcouch-sil tjcouch-sil deleted the add-generated-warning branch December 17, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants