Skip to content
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

Reformat canonical data to be GitHub editor-friendly #1443

Closed
ErikSchierboom opened this issue Jan 14, 2019 · 7 comments
Closed

Reformat canonical data to be GitHub editor-friendly #1443

ErikSchierboom opened this issue Jan 14, 2019 · 7 comments

Comments

@ErikSchierboom
Copy link
Member

When making a simple PR, being able to create it by just using the GitHub interface is great. However, most of our canonical data files have an additional character (newline I guess) at the end of the file. This has the effect of each PR created through the GitHub interface also automatically removing that trailing character. Wouldn't it be convenient if our canonical data files would all have that additional character stripped, such that it would become possible to create a GitHub PR without this automatic change?

@rpottsoh
Copy link
Member

I was interpreting this the other way around. The GitHub editor was adding a character (newline/cr, I am not clear on which) to the end of the file where one previously didn't exist.

@ErikSchierboom
Copy link
Member Author

Ah right, I might have misread the diff. Sorry about that! The principle still holds that I'd like the canonical data to be GitHub-friendly, which thus might mean adding a newline instead of removing one.

@petertseng
Copy link
Member

each PR created through the GitHub interface also automatically removing that trailing character.

#1444 is evidence in opposition to this statement

The GitHub editor was adding a character (newline/cr, I am not clear on which) to the end of the file where one previously didn't exist.

#1444 is evidence in support of this statement

@rpottsoh
Copy link
Member

rpottsoh commented Jan 14, 2019

Travis CI should also be instructed (updated) to check for the proper (desired) ending of the canonical-data.json file.

@petertseng
Copy link
Member

after discussion in this issue has decided what (if any) reformatting is necessary, a logical next step would be to create an issue whose goal is to add any linting rules that arising from the reformatting, as suggested in #1424 (comment). The benefits would be that humans have to do less review work. If that is done, consider the effect on contributors (will they have to install the linter, etc., and/or is it easy for the contributors to apply a suggested change even if the linter is not installed).

@rpottsoh
Copy link
Member

rpottsoh commented Jan 14, 2019

README.md should be updated to instruct authors to include the necessary characters at the end of the file.

@Smarticles101
Copy link
Member

Not just the github interface, many other editors add a newline character to the end of the file.

There's a very good explanation for this on stackoverflow

The tl;dr version of it is that the POSIX standard defines a line as having a newline at the end. Thus, some programs have problems when the last line doesn't fit this standard.

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

No branches or pull requests

4 participants