rocksdb/build_tools
Jay Huh c4bbad4dfe Update format-diff script to add text to new files (#14143)
Summary:
Fixing internal validator failure

```
Every project specific source file must contain a doc block with an appropriate copyright header. Unrelated files must be listed as exceptions in the Copyright Headers Exceptions page in the repo dashboard.
A copyright header clearly indicates that the code is owned by Meta. Every open source file must start with a comment containing "Meta Platforms, Inc. and affiliates"
https://github.com/facebook/rocksdb/blob/main/buckifier/targets_cfg.py:
The first 16 lines of 'buckifier/targets_cfg.py' do not contain the patterns:
	(Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)
```

While fixing the text to pass the linter, I took the opportunity to modify `format-diff.sh` script to add the copyright header automatically if missing in new files.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/14143

Test Plan:
```
$> make format
```
**new python file**
```
build_tools/format-diff.sh
Checking format of uncommitted changes...
Checking for copyright headers in new files...
Added copyright header to build_tools/test.py
Copyright headers were added to new files.
Nothing needs to be reformatted!
```
**new header file**
```
build_tools/format-diff.sh
Checking format of uncommitted changes...
Checking for copyright headers in new files...
Added copyright header to db/db_impl/db_impl_jewoongh.h
Copyright headers were added to new files.
Nothing needs to be reformatted!
```

Reviewed By: hx235

Differential Revision: D87653124

Pulled By: jaykorean

fbshipit-source-id: 164322cfcd2c162bb3b41bb8f3bafefa3f20b695
2025-11-21 11:32:10 -08:00
..
ubuntu20_image Add OpenSSL to docker image (#10741) 2022-09-26 17:36:57 -07:00
ubuntu22_image Use C++20 in public API, fix CI (#13915) 2025-09-08 13:11:28 -07:00
ubuntu24_image Use C++20 in public API, fix CI (#13915) 2025-09-08 13:11:28 -07:00
amalgamate.py internal_repo_rocksdb 2024-10-14 03:01:20 -07:00
benchmark_log_tool.py internal_repo_rocksdb 2024-10-14 03:01:20 -07:00
build_detect_platform Fix ODR violation from open source folly build, update (#14094) 2025-11-02 16:08:09 -08:00
check-public-header.sh Fix and check for potential ODR violations (#14096) 2025-11-04 19:47:42 -08:00
check-sources.sh Fix bad include (#10213) 2022-06-20 17:42:01 -07:00
dependencies_platform010.sh switch to using centos8-native (#12367) 2024-02-21 12:03:40 -08:00
dockerbuild.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
error_filter.py internal_repo_rocksdb 2024-10-14 03:01:20 -07:00
fb_compile_mongo.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
fbcode_config.sh Fix scan-build path (#12563) 2024-04-19 08:45:16 -07:00
fbcode_config_platform010.sh Require ZSTD >= 1.4.0, greatly simplifying related code (#13362) 2025-02-04 12:03:32 -08:00
format-diff.sh Update format-diff script to add text to new files (#14143) 2025-11-21 11:32:10 -08:00
gnu_parallel Initial CircleCI -> GitHub Actions migration (#12163) 2023-12-21 15:40:21 -08:00
make_package.sh Use standard variables for installing/uninstalling with make (#7187) 2020-08-28 14:47:31 -07:00
ps_with_stack Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
regression_build_test.sh Backport an internal change to regression_build_test.sh (#11319) 2023-03-22 13:33:50 -07:00
run_ci_db_test.ps1 Fix remaining uses of "backupable" (#9792) 2022-04-05 09:52:33 -07:00
setup_centos7.sh Adding new build script for CentOS 7 (#6617) 2020-04-06 16:20:27 -07:00
update_dependencies.sh switch to using centos8-native (#12367) 2024-02-21 12:03:40 -08:00
version.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00