Skip to content

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

Merged
jeysal merged 3 commits intojestjs:masterfrom
pedrottimark:copyright-license
Aug 13, 2019
Merged

chore: Check copyright and license as one joined substring#8815
jeysal merged 3 commits intojestjs:masterfrom
pedrottimark:copyright-license

Conversation

@pedrottimark
Copy link
Copy Markdown
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 ❤️

Comment thread scripts/checkCopyrightHeaders.js Outdated
function needsCopyrightHeader(file) {
const contents = getFileContents(file);

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

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
Copy Markdown
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
Copy Markdown

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