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

Check PATENTS does not creep into files #18143

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ aliases:
command: yarn flow check
when: always

- &run-license-checks
name: Check license
command: ./scripts/circleci/check_license.sh
when: always

- &build-android-app
name: Build Android App
command: |
Expand Down Expand Up @@ -275,14 +280,15 @@ jobs:

# Runs JavaScript lint and flow checks.
# Currently will fail a PR if lint/flow raises issues.
js_checks:
analyze:
<<: *js_defaults
steps:
- attach_workspace:
at: ~/react-native

- run: *run-lint-checks
- run: *run-flow-checks
- run: *run-license-checks

- store_test_results:
path: ~/react-native/reports/junit
Expand Down Expand Up @@ -576,8 +582,8 @@ workflows:
- checkout_code:
filters: *filter-ignore-gh-pages

# Run lint and flow checks
- js_checks:
# Run lint, flow, and other checks
- analyze:
filters: *filter-ignore-gh-pages
requires:
- checkout_code
Expand Down
6 changes: 2 additions & 4 deletions Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import "RCTAnimatedNode.h"
Expand Down
6 changes: 2 additions & 4 deletions Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import "RCTTrackingAnimatedNode.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.animated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.views.text;
Expand Down
9 changes: 4 additions & 5 deletions ReactCommon/yoga/yoga/YGLayout.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#include "YGLayout.h"

const std::array<float, 2> kYGDefaultDimensionValues = {
Expand Down
9 changes: 4 additions & 5 deletions ReactCommon/yoga/yoga/YGLayout.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once
#include "Yoga-internal.h"

Expand Down
9 changes: 4 additions & 5 deletions ReactCommon/yoga/yoga/YGStyle.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#include "YGStyle.h"

const YGValue kYGValueUndefined = {YGUndefined, YGUnitUndefined};
Expand Down
9 changes: 4 additions & 5 deletions ReactCommon/yoga/yoga/YGStyle.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once
#include "Yoga-internal.h"
#include "Yoga.h"
Expand Down
13 changes: 13 additions & 0 deletions scripts/circleci/check_license.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e

# Make sure we don't introduce accidental references to PATENTS.
EXPECTED='scripts/circleci/check_license.sh'
ACTUAL=$(git grep -l PATENTS)

if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "PATENTS crept into some new files?"
diff -u <(echo "$EXPECTED") <(echo "$ACTUAL") || true
exit 1
fi