rocksdb/buckifier
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
..
bench-slow.json Remove flaky servicelab metrics DBPut P95/P99 (#9844) 2022-04-15 13:56:22 -07:00
bench.json Remove flaky servicelab metrics DBPut P95/P99 (#9844) 2022-04-15 13:56:22 -07:00
buckify_rocksdb.py Add oncall to BUCK file (#14134) 2025-11-19 14:04:58 -08:00
check_buck_targets.sh Refresh check_buck_targets.sh (#13196) 2024-12-09 10:02:57 -08:00
rocks_test_runner.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
targets_builder.py Add oncall to BUCK file (#14134) 2025-11-19 14:04:58 -08:00
targets_cfg.py Update format-diff script to add text to new files (#14143) 2025-11-21 11:32:10 -08:00
util.py internal_repo_rocksdb 2024-10-14 03:01:20 -07:00