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

chore: Check copyright and license as one joined substring #8815

Merged
merged 3 commits into from
Aug 13, 2019

Conversation

pedrottimark
Copy link
Contributor

Summary

What do y’all think? In the first draft of #8783 a joined substring found some mistakes:

  • 6 files with extra redundant All rights reserved. line between copyright and license
  • missing period at end of copyright line in checkCopyrightHeaders.js itself ;)

that searching for the 3 lines independently (in the merged code) does not find

Test plan

yarn check-copyright-headers

After #8809 the script will pass when run locally on Windows system, correct?

Tim, thanks again for researching such a smart solution ❤️

' *',
' * This source code is licensed under the MIT license found in the',
' * LICENSE file in the root directory of this source tree.',
].join('\n');

function needsCopyrightHeader(file) {
const contents = getFileContents(file);

// Match lines individually to avoid false positive for:
Copy link
Contributor

Choose a reason for hiding this comment

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

@pedrottimark Yes the line endings now shouldn't be a problem as they're required to be LF. But this comment says another reason why lines are checked individually is the ability to use line comments instead of a block comment. Looks like this possibility is never used (CI is green) but wondering if these line substrings are the standard license header check for FB or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry to make you do the proof reading that I should have done, because I wrote that comment in the previous PR and that sentence was a step in the wrong direction.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants