-
Notifications
You must be signed in to change notification settings - Fork 3
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
Problem with matching notice headers because of line endings mismatch on Windows #11
Comments
Hey @OrkoHunter,
This is an excellent solution. Or at least normalize line endings to be unix line endings. I don't think people care too much about what kind of line endings are in a copyright notice, but maybe their existence matters. I'll look into fixing this soon (today probably) as well as adding a CI system to test on both windows/mac. I think Travis CI supports that. |
- Added logic to normalize all strings to unix line endings - Made some files CRLF and LF in unit tests - Added .travis.yml for testing on windows and linux - Added staging tests
Hey @OrkoHunter, |
Thank you thank you @nickdeis !! |
Thank you @nickdeis ! This looks fixed, and I will close the issue. |
nickdeis/eslint-plugin-notice#11 was impacting contributors to Backstage
Hi @nickdeis ! Thank you for creating the tool, it's very useful! ❤️
Friends at Spotify are using this plugin to lint for notice headers in their Open Source projects. See spotify/eslint-config-oss. There is a notice template file in the repository containing the template for Spotify copyright notice.
When working on spotify/backstage, users noticed that the project would not build on Windows OS and the problem is "missing notice header". Note that there are no errors on the unix platform. All the project source files do have the notice in place, and we should not be seeing this error.
Another key fact is that our build broke when we moved the notice header to a separate text file.
One of the causes we think is that the line endings are different in the backstage source code files and the
notice-template.txt
. And thus, the matching logic ineslint-plugin-notice
is having issues, even though the notice text is exactly the same.I am referring this comment from @Rugvip on backstage/backstage#613. The issue has more details!
A possible solution is to improve the logic in this plugin to ignore line endings when matching the notice headers. Or it could allow to suppress errors raised due to line endings.
Let us know your thoughts! 🙇
cc @fastfrwrd
The text was updated successfully, but these errors were encountered: