Check PATENTS does not creep into files
Summary: Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project. Let the script run, prior to fixing the errant files. The script outputs the following: ``` PATENTS crept into some new files? --- /dev/fd/63 2018-03-01 01:42:48.250153746 +0000 +++ /dev/fd/62 2018-03-01 01:42:48.250153746 +0000 @@ -1 +1,9 @@ +Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h +Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m +ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.java +ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLetterSpacingSpan.java +ReactCommon/yoga/yoga/YGLayout.cpp +ReactCommon/yoga/yoga/YGLayout.h +ReactCommon/yoga/yoga/YGStyle.cpp +ReactCommon/yoga/yoga/YGStyle.h scripts/circleci/check_license.sh Exited with code 1 ``` Fix the headers in these files and run the script again. No output, exit code 0. Closes https://github.com/facebook/react-native/pull/18143 Reviewed By: sophiebits Differential Revision: D7119356 Pulled By: hramos fbshipit-source-id: d238e4d4a3ae320a2c8e625c2fa29690057a4814
This commit is contained in:
parent
8a7f68e211
commit
b181b7797f
|
@ -152,6 +152,11 @@ aliases:
|
||||||
command: yarn flow check
|
command: yarn flow check
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
- &run-license-checks
|
||||||
|
name: Check license
|
||||||
|
command: ./scripts/circleci/check_license.sh
|
||||||
|
when: always
|
||||||
|
|
||||||
- &build-android-app
|
- &build-android-app
|
||||||
name: Build Android App
|
name: Build Android App
|
||||||
command: |
|
command: |
|
||||||
|
@ -275,7 +280,7 @@ jobs:
|
||||||
|
|
||||||
# Runs JavaScript lint and flow checks.
|
# Runs JavaScript lint and flow checks.
|
||||||
# Currently will fail a PR if lint/flow raises issues.
|
# Currently will fail a PR if lint/flow raises issues.
|
||||||
js_checks:
|
analyze:
|
||||||
<<: *js_defaults
|
<<: *js_defaults
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
|
@ -283,6 +288,7 @@ jobs:
|
||||||
|
|
||||||
- run: *run-lint-checks
|
- run: *run-lint-checks
|
||||||
- run: *run-flow-checks
|
- run: *run-flow-checks
|
||||||
|
- run: *run-license-checks
|
||||||
|
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/react-native/reports/junit
|
path: ~/react-native/reports/junit
|
||||||
|
@ -576,8 +582,8 @@ workflows:
|
||||||
- checkout_code:
|
- checkout_code:
|
||||||
filters: *filter-ignore-gh-pages
|
filters: *filter-ignore-gh-pages
|
||||||
|
|
||||||
# Run lint and flow checks
|
# Run lint, flow, and other checks
|
||||||
- js_checks:
|
- analyze:
|
||||||
filters: *filter-ignore-gh-pages
|
filters: *filter-ignore-gh-pages
|
||||||
requires:
|
requires:
|
||||||
- checkout_code
|
- checkout_code
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "RCTAnimatedNode.h"
|
#import "RCTAnimatedNode.h"
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "RCTTrackingAnimatedNode.h"
|
#import "RCTTrackingAnimatedNode.h"
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.react.animated;
|
package com.facebook.react.animated;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.react.views.text;
|
package com.facebook.react.views.text;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGLayout.h"
|
#include "YGLayout.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Yoga-internal.h"
|
#include "Yoga-internal.h"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGStyle.h"
|
#include "YGStyle.h"
|
||||||
|
|
||||||
const YGValue kYGValueUndefined = {YGUndefined, YGUnitUndefined};
|
const YGValue kYGValueUndefined = {YGUndefined, YGUnitUndefined};
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Yoga-internal.h"
|
#include "Yoga-internal.h"
|
||||||
#include "Yoga.h"
|
#include "Yoga.h"
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue