From bca1b5a4ae311511fe87ff0dd3ccecc32955d024 Mon Sep 17 00:00:00 2001 From: Joshua Cannon Date: Tue, 6 Dec 2022 15:25:10 -0600 Subject: [PATCH] Switch our usage of `regex-lint` to `preamble` (#17724) This change has been a long time coming :smile_cat: We're now using `premable` for copyright headers, auto-added in `fmt` instead of simply checking in `lint`. Annnd now we're formatting the rust files as well (look at all those missing headers) We can discuss offline what happens to `regex-lint` :smile: --- build-support/preambles/config.yaml | 6 ++++ build-support/regexes/config.yaml | 32 ------------------- pants.toml | 5 +-- src/rust/engine/async_latch/src/tests.rs | 2 ++ src/rust/engine/async_value/src/tests.rs | 2 ++ src/rust/engine/concrete_time/src/tests.rs | 2 ++ src/rust/engine/fs/brfs/src/syscall_tests.rs | 2 ++ src/rust/engine/fs/brfs/src/tests.rs | 2 ++ src/rust/engine/fs/src/posixfs_tests.rs | 2 ++ src/rust/engine/fs/src/tests.rs | 2 ++ .../engine/fs/store/src/immutable_inputs.rs | 2 ++ src/rust/engine/fs/store/src/local.rs | 2 ++ src/rust/engine/fs/store/src/local_tests.rs | 2 ++ src/rust/engine/fs/store/src/remote.rs | 2 ++ src/rust/engine/fs/store/src/remote_tests.rs | 2 ++ .../engine/fs/store/src/snapshot_ops_tests.rs | 2 ++ .../engine/fs/store/src/snapshot_tests.rs | 2 ++ src/rust/engine/fs/store/src/tests.rs | 2 ++ src/rust/engine/graph/src/entry.rs | 2 ++ src/rust/engine/graph/src/tests.rs | 2 ++ src/rust/engine/grpc_util/src/hyper.rs | 2 ++ src/rust/engine/grpc_util/src/tls.rs | 2 ++ src/rust/engine/hashing/src/digest_tests.rs | 2 ++ .../engine/hashing/src/fingerprint_tests.rs | 2 ++ src/rust/engine/hashing/src/hasher_tests.rs | 2 ++ src/rust/engine/nailgun/src/tests.rs | 2 ++ .../engine/process_execution/src/bounded.rs | 2 ++ .../process_execution/src/bounded_tests.rs | 2 ++ .../engine/process_execution/src/cache.rs | 2 ++ .../process_execution/src/cache_tests.rs | 2 ++ .../engine/process_execution/src/children.rs | 2 ++ .../engine/process_execution/src/docker.rs | 2 ++ .../process_execution/src/docker_tests.rs | 2 ++ .../engine/process_execution/src/local.rs | 2 ++ .../process_execution/src/local_tests.rs | 2 ++ .../process_execution/src/nailgun/mod.rs | 2 ++ .../src/nailgun/parsed_jvm_command_lines.rs | 2 ++ .../nailgun/parsed_jvm_command_lines_tests.rs | 2 ++ .../process_execution/src/nailgun/tests.rs | 2 ++ .../process_execution/src/named_caches.rs | 2 ++ .../engine/process_execution/src/remote.rs | 2 ++ .../process_execution/src/remote_cache.rs | 2 ++ .../src/remote_cache_tests.rs | 2 ++ .../process_execution/src/remote_tests.rs | 2 ++ src/rust/engine/protos/src/conversions.rs | 2 ++ .../engine/protos/src/conversions_tests.rs | 2 ++ src/rust/engine/protos/src/verification.rs | 2 ++ .../engine/protos/src/verification_tests.rs | 2 ++ src/rust/engine/rule_graph/src/tests.rs | 2 ++ src/rust/engine/sharded_lmdb/src/tests.rs | 2 ++ .../engine/src/externs/interface_tests.rs | 2 ++ src/rust/engine/stdio/src/term.rs | 2 ++ src/rust/engine/testutil/mock/src/cas.rs | 2 ++ .../engine/testutil/mock/src/cas_service.rs | 2 ++ .../testutil/mock/src/execution_server.rs | 2 ++ src/rust/engine/testutil/src/data.rs | 2 ++ src/rust/engine/testutil/src/file.rs | 2 ++ src/rust/engine/testutil/src/path.rs | 2 ++ src/rust/engine/watch/src/tests.rs | 2 ++ src/rust/engine/workunit_store/src/tests.rs | 2 ++ 60 files changed, 123 insertions(+), 34 deletions(-) create mode 100644 build-support/preambles/config.yaml delete mode 100644 build-support/regexes/config.yaml diff --git a/build-support/preambles/config.yaml b/build-support/preambles/config.yaml new file mode 100644 index 00000000000..c123399ad80 --- /dev/null +++ b/build-support/preambles/config.yaml @@ -0,0 +1,6 @@ +"**/*.py:!**/__init__.py:**/BUILD:**/BUILD.*": |+ + # Copyright $year Pants project contributors (see CONTRIBUTORS.md). + # Licensed under the Apache License, Version 2.0 (see LICENSE). +"**/*.rs": |+ + // Copyright $year Pants project contributors (see CONTRIBUTORS.md). + // Licensed under the Apache License, Version 2.0 (see LICENSE). diff --git a/build-support/regexes/config.yaml b/build-support/regexes/config.yaml deleted file mode 100644 index dde315ef084..00000000000 --- a/build-support/regexes/config.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Note that for values that are regexes, how YAML interprets backslashes and other -# special characters matters. For example, an unquoted string is interpreted as a raw -# string with no escape characters (so it's particularly useful for expressing regexes). -# Adding quotes around these may change their meaning, so don't do so without thought. - -path_patterns: - - name: python_source - pattern: (?=3.7,<3.10"] -[regex-lint] -config = "@build-support/regexes/config.yaml" +[preamble] +template_by_globs = "@build-support/preambles/config.yaml" [generate-lockfiles] custom_command = "build-support/bin/generate_all_lockfiles.sh" diff --git a/src/rust/engine/async_latch/src/tests.rs b/src/rust/engine/async_latch/src/tests.rs index 34e16c8473e..bfe70527f2e 100644 --- a/src/rust/engine/async_latch/src/tests.rs +++ b/src/rust/engine/async_latch/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::time::Duration; use tokio::time::sleep; diff --git a/src/rust/engine/async_value/src/tests.rs b/src/rust/engine/async_value/src/tests.rs index 6d0c0c658cf..2bc54ff623d 100644 --- a/src/rust/engine/async_value/src/tests.rs +++ b/src/rust/engine/async_value/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::AsyncValue; use std::time::Duration; diff --git a/src/rust/engine/concrete_time/src/tests.rs b/src/rust/engine/concrete_time/src/tests.rs index a7c29081d57..d742d2c0792 100644 --- a/src/rust/engine/concrete_time/src/tests.rs +++ b/src/rust/engine/concrete_time/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::{Duration, TimeSpan}; #[test] diff --git a/src/rust/engine/fs/brfs/src/syscall_tests.rs b/src/rust/engine/fs/brfs/src/syscall_tests.rs index ffb22d45212..d49d7e3bb3e 100644 --- a/src/rust/engine/fs/brfs/src/syscall_tests.rs +++ b/src/rust/engine/fs/brfs/src/syscall_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). // TODO: Write a bunch more syscall-y tests to test that each syscall for each file/directory type // acts as we expect. diff --git a/src/rust/engine/fs/brfs/src/tests.rs b/src/rust/engine/fs/brfs/src/tests.rs index 9e18098a479..57afa7991a6 100644 --- a/src/rust/engine/fs/brfs/src/tests.rs +++ b/src/rust/engine/fs/brfs/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use tempfile; use testutil; diff --git a/src/rust/engine/fs/src/posixfs_tests.rs b/src/rust/engine/fs/src/posixfs_tests.rs index 8e377cdf1cb..a2d32006014 100644 --- a/src/rust/engine/fs/src/posixfs_tests.rs +++ b/src/rust/engine/fs/src/posixfs_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::path::{Path, PathBuf}; use std::sync::Arc; diff --git a/src/rust/engine/fs/src/tests.rs b/src/rust/engine/fs/src/tests.rs index f793c096dd9..da5e9fecc8f 100644 --- a/src/rust/engine/fs/src/tests.rs +++ b/src/rust/engine/fs/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::RelativePath; #[test] diff --git a/src/rust/engine/fs/store/src/immutable_inputs.rs b/src/rust/engine/fs/store/src/immutable_inputs.rs index 247eba4802c..1f7ffea981e 100644 --- a/src/rust/engine/fs/store/src/immutable_inputs.rs +++ b/src/rust/engine/fs/store/src/immutable_inputs.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::path::{Path, PathBuf}; use std::sync::Arc; diff --git a/src/rust/engine/fs/store/src/local.rs b/src/rust/engine/fs/store/src/local.rs index f4e57cc426e..55339eae320 100644 --- a/src/rust/engine/fs/store/src/local.rs +++ b/src/rust/engine/fs/store/src/local.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use super::{EntryType, ShrinkBehavior}; use std::collections::{BinaryHeap, HashSet}; diff --git a/src/rust/engine/fs/store/src/local_tests.rs b/src/rust/engine/fs/store/src/local_tests.rs index c1e7d7a15b4..13b3190ec45 100644 --- a/src/rust/engine/fs/store/src/local_tests.rs +++ b/src/rust/engine/fs/store/src/local_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::local::ByteStore; use crate::{EntryType, LocalOptions, ShrinkBehavior}; diff --git a/src/rust/engine/fs/store/src/remote.rs b/src/rust/engine/fs/store/src/remote.rs index a6c17540d88..e0ce73ea51b 100644 --- a/src/rust/engine/fs/store/src/remote.rs +++ b/src/rust/engine/fs/store/src/remote.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::cmp::min; use std::collections::{BTreeMap, HashSet}; use std::convert::TryInto; diff --git a/src/rust/engine/fs/store/src/remote_tests.rs b/src/rust/engine/fs/store/src/remote_tests.rs index 56f7af3f6fb..a5fed0d1811 100644 --- a/src/rust/engine/fs/store/src/remote_tests.rs +++ b/src/rust/engine/fs/store/src/remote_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, HashSet}; use std::time::Duration; diff --git a/src/rust/engine/fs/store/src/snapshot_ops_tests.rs b/src/rust/engine/fs/store/src/snapshot_ops_tests.rs index b1202aabff7..5a062fef64e 100644 --- a/src/rust/engine/fs/store/src/snapshot_ops_tests.rs +++ b/src/rust/engine/fs/store/src/snapshot_ops_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::fs::create_dir_all; use std::path::Path; use std::sync::Arc; diff --git a/src/rust/engine/fs/store/src/snapshot_tests.rs b/src/rust/engine/fs/store/src/snapshot_tests.rs index cb17124a964..bbca32fbd72 100644 --- a/src/rust/engine/fs/store/src/snapshot_tests.rs +++ b/src/rust/engine/fs/store/src/snapshot_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::convert::TryInto; use std::path::{Path, PathBuf}; use std::sync::Arc; diff --git a/src/rust/engine/fs/store/src/tests.rs b/src/rust/engine/fs/store/src/tests.rs index b84f229aa42..5703f0c4280 100644 --- a/src/rust/engine/fs/store/src/tests.rs +++ b/src/rust/engine/fs/store/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::fs::File; use std::io::Read; diff --git a/src/rust/engine/graph/src/entry.rs b/src/rust/engine/graph/src/entry.rs index 291225b6408..d361c82314c 100644 --- a/src/rust/engine/graph/src/entry.rs +++ b/src/rust/engine/graph/src/entry.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::mem; use std::sync::Arc; diff --git a/src/rust/engine/graph/src/tests.rs b/src/rust/engine/graph/src/tests.rs index fb9b125bbfa..afc0b38d7aa 100644 --- a/src/rust/engine/graph/src/tests.rs +++ b/src/rust/engine/graph/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::cmp; use std::collections::{HashMap, HashSet}; use std::future::Future; diff --git a/src/rust/engine/grpc_util/src/hyper.rs b/src/rust/engine/grpc_util/src/hyper.rs index 6663e8232df..9c9776daf55 100644 --- a/src/rust/engine/grpc_util/src/hyper.rs +++ b/src/rust/engine/grpc_util/src/hyper.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::ops::Deref; use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/src/rust/engine/grpc_util/src/tls.rs b/src/rust/engine/grpc_util/src/tls.rs index cca6863547b..a75b9d6f9c1 100644 --- a/src/rust/engine/grpc_util/src/tls.rs +++ b/src/rust/engine/grpc_util/src/tls.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::sync::Arc; use rustls::{ClientConfig, RootCertStore, ServerCertVerified, ServerCertVerifier, TLSError}; diff --git a/src/rust/engine/hashing/src/digest_tests.rs b/src/rust/engine/hashing/src/digest_tests.rs index 8827640704a..4735d0f6550 100644 --- a/src/rust/engine/hashing/src/digest_tests.rs +++ b/src/rust/engine/hashing/src/digest_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use self::serde_test::{assert_tokens, Token}; use super::Digest; use super::Fingerprint; diff --git a/src/rust/engine/hashing/src/fingerprint_tests.rs b/src/rust/engine/hashing/src/fingerprint_tests.rs index e453d59d315..67674ce54d1 100644 --- a/src/rust/engine/hashing/src/fingerprint_tests.rs +++ b/src/rust/engine/hashing/src/fingerprint_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::Fingerprint; use serde_test::{assert_ser_tokens, Token}; diff --git a/src/rust/engine/hashing/src/hasher_tests.rs b/src/rust/engine/hashing/src/hasher_tests.rs index 4504b995b8f..03a932ad0af 100644 --- a/src/rust/engine/hashing/src/hasher_tests.rs +++ b/src/rust/engine/hashing/src/hasher_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). #[test] fn hashes() { let mut src = "meep".as_bytes(); diff --git a/src/rust/engine/nailgun/src/tests.rs b/src/rust/engine/nailgun/src/tests.rs index a14e2805d68..c4e6bfce9bb 100644 --- a/src/rust/engine/nailgun/src/tests.rs +++ b/src/rust/engine/nailgun/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::Server; use std::path::PathBuf; diff --git a/src/rust/engine/process_execution/src/bounded.rs b/src/rust/engine/process_execution/src/bounded.rs index 22072edd917..84923524489 100644 --- a/src/rust/engine/process_execution/src/bounded.rs +++ b/src/rust/engine/process_execution/src/bounded.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::borrow::Cow; use std::cmp::{max, min, Ordering, Reverse}; use std::collections::VecDeque; diff --git a/src/rust/engine/process_execution/src/bounded_tests.rs b/src/rust/engine/process_execution/src/bounded_tests.rs index b1c9d291b90..c69714ac994 100644 --- a/src/rust/engine/process_execution/src/bounded_tests.rs +++ b/src/rust/engine/process_execution/src/bounded_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::sync::Arc; use std::time::{Duration, Instant}; diff --git a/src/rust/engine/process_execution/src/cache.rs b/src/rust/engine/process_execution/src/cache.rs index e32495871bf..b39820d2c3c 100644 --- a/src/rust/engine/process_execution/src/cache.rs +++ b/src/rust/engine/process_execution/src/cache.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::fmt::{self, Debug}; use std::sync::Arc; use std::time::Instant; diff --git a/src/rust/engine/process_execution/src/cache_tests.rs b/src/rust/engine/process_execution/src/cache_tests.rs index 7de52cdf329..21604c5292b 100644 --- a/src/rust/engine/process_execution/src/cache_tests.rs +++ b/src/rust/engine/process_execution/src/cache_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::convert::TryInto; use std::io::Write; use std::path::PathBuf; diff --git a/src/rust/engine/process_execution/src/children.rs b/src/rust/engine/process_execution/src/children.rs index 34010a98677..3b374913e9a 100644 --- a/src/rust/engine/process_execution/src/children.rs +++ b/src/rust/engine/process_execution/src/children.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::ops::{Deref, DerefMut}; use std::sync::atomic::{AtomicBool, Ordering}; use std::{thread, time}; diff --git a/src/rust/engine/process_execution/src/docker.rs b/src/rust/engine/process_execution/src/docker.rs index 8ab7f1b85fc..85340a2c012 100644 --- a/src/rust/engine/process_execution/src/docker.rs +++ b/src/rust/engine/process_execution/src/docker.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::BTreeMap; use std::fmt; use std::path::{Path, PathBuf}; diff --git a/src/rust/engine/process_execution/src/docker_tests.rs b/src/rust/engine/process_execution/src/docker_tests.rs index dd2deee893b..42705715cc1 100644 --- a/src/rust/engine/process_execution/src/docker_tests.rs +++ b/src/rust/engine/process_execution/src/docker_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::env; use std::path::PathBuf; diff --git a/src/rust/engine/process_execution/src/local.rs b/src/rust/engine/process_execution/src/local.rs index fe92270b1ab..180c0402979 100644 --- a/src/rust/engine/process_execution/src/local.rs +++ b/src/rust/engine/process_execution/src/local.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::ffi::OsStr; use std::fmt::{self, Debug}; diff --git a/src/rust/engine/process_execution/src/local_tests.rs b/src/rust/engine/process_execution/src/local_tests.rs index c2aa134ef4b..9a9c2c232d3 100644 --- a/src/rust/engine/process_execution/src/local_tests.rs +++ b/src/rust/engine/process_execution/src/local_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::path::PathBuf; use std::str; diff --git a/src/rust/engine/process_execution/src/nailgun/mod.rs b/src/rust/engine/process_execution/src/nailgun/mod.rs index ec6af0eb0ef..7bff42409e7 100644 --- a/src/rust/engine/process_execution/src/nailgun/mod.rs +++ b/src/rust/engine/process_execution/src/nailgun/mod.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet}; use std::fmt::{self, Debug}; use std::net::SocketAddr; diff --git a/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines.rs b/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines.rs index a1c0473fa7e..f904c868918 100644 --- a/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines.rs +++ b/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use itertools::Itertools; use std::slice::Iter; diff --git a/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines_tests.rs b/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines_tests.rs index ca266bcf22d..116c3b3e297 100644 --- a/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines_tests.rs +++ b/src/rust/engine/process_execution/src/nailgun/parsed_jvm_command_lines_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::nailgun::parsed_jvm_command_lines::ParsedJVMCommandLines; // TODO we should be able to use https://docs.rs/crate/derive_builder/0.8.0 diff --git a/src/rust/engine/process_execution/src/nailgun/tests.rs b/src/rust/engine/process_execution/src/nailgun/tests.rs index 77ce45d6109..0b1227350aa 100644 --- a/src/rust/engine/process_execution/src/nailgun/tests.rs +++ b/src/rust/engine/process_execution/src/nailgun/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::path::PathBuf; use store::{ImmutableInputs, Store}; diff --git a/src/rust/engine/process_execution/src/named_caches.rs b/src/rust/engine/process_execution/src/named_caches.rs index 980ea5a799e..c3b1c0a7844 100644 --- a/src/rust/engine/process_execution/src/named_caches.rs +++ b/src/rust/engine/process_execution/src/named_caches.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::BTreeMap; use std::path::{Path, PathBuf}; diff --git a/src/rust/engine/process_execution/src/remote.rs b/src/rust/engine/process_execution/src/remote.rs index 9b55c8ed509..597e9c6dd2c 100644 --- a/src/rust/engine/process_execution/src/remote.rs +++ b/src/rust/engine/process_execution/src/remote.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::cmp::Ordering; use std::collections::{BTreeMap, HashMap}; use std::convert::TryInto; diff --git a/src/rust/engine/process_execution/src/remote_cache.rs b/src/rust/engine/process_execution/src/remote_cache.rs index 369a4fbc706..06d023dde83 100644 --- a/src/rust/engine/process_execution/src/remote_cache.rs +++ b/src/rust/engine/process_execution/src/remote_cache.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, HashSet}; use std::convert::TryInto; use std::fmt::{self, Debug}; diff --git a/src/rust/engine/process_execution/src/remote_cache_tests.rs b/src/rust/engine/process_execution/src/remote_cache_tests.rs index 9c8cc09e548..2385fdaafee 100644 --- a/src/rust/engine/process_execution/src/remote_cache_tests.rs +++ b/src/rust/engine/process_execution/src/remote_cache_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, HashSet}; use std::convert::TryInto; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/src/rust/engine/process_execution/src/remote_tests.rs b/src/rust/engine/process_execution/src/remote_tests.rs index 204882878ad..c4809c65eef 100644 --- a/src/rust/engine/process_execution/src/remote_tests.rs +++ b/src/rust/engine/process_execution/src/remote_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::convert::TryInto; use std::path::{Path, PathBuf}; diff --git a/src/rust/engine/protos/src/conversions.rs b/src/rust/engine/protos/src/conversions.rs index 1e385d8cf00..e0929c3ef62 100644 --- a/src/rust/engine/protos/src/conversions.rs +++ b/src/rust/engine/protos/src/conversions.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). impl<'a> From<&'a hashing::Digest> for crate::gen::build::bazel::remote::execution::v2::Digest { fn from(d: &'a hashing::Digest) -> Self { Self { diff --git a/src/rust/engine/protos/src/conversions_tests.rs b/src/rust/engine/protos/src/conversions_tests.rs index 3ee74a84408..1ab3f064660 100644 --- a/src/rust/engine/protos/src/conversions_tests.rs +++ b/src/rust/engine/protos/src/conversions_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::convert::TryInto; use hashing; diff --git a/src/rust/engine/protos/src/verification.rs b/src/rust/engine/protos/src/verification.rs index a5b82ae9499..fa611636857 100644 --- a/src/rust/engine/protos/src/verification.rs +++ b/src/rust/engine/protos/src/verification.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::HashSet; use hashing::Digest; diff --git a/src/rust/engine/protos/src/verification_tests.rs b/src/rust/engine/protos/src/verification_tests.rs index dcedf5f138b..c4b310e0953 100644 --- a/src/rust/engine/protos/src/verification_tests.rs +++ b/src/rust/engine/protos/src/verification_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use hashing::EMPTY_DIGEST; use crate::gen::build::bazel::remote::execution::v2::{Digest, Directory, DirectoryNode, FileNode}; diff --git a/src/rust/engine/rule_graph/src/tests.rs b/src/rust/engine/rule_graph/src/tests.rs index 63d710fbb16..9c0f40aa750 100644 --- a/src/rust/engine/rule_graph/src/tests.rs +++ b/src/rust/engine/rule_graph/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::fmt; use indexmap::{indexset, IndexSet}; diff --git a/src/rust/engine/sharded_lmdb/src/tests.rs b/src/rust/engine/sharded_lmdb/src/tests.rs index 2d84fdbd706..a9f715195c9 100644 --- a/src/rust/engine/sharded_lmdb/src/tests.rs +++ b/src/rust/engine/sharded_lmdb/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::HashMap; use bytes::{Buf, Bytes}; diff --git a/src/rust/engine/src/externs/interface_tests.rs b/src/rust/engine/src/externs/interface_tests.rs index 4caf2040de8..a55bfe36c79 100644 --- a/src/rust/engine/src/externs/interface_tests.rs +++ b/src/rust/engine/src/externs/interface_tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::externs::interface::generate_panic_string; use std::any::Any; diff --git a/src/rust/engine/stdio/src/term.rs b/src/rust/engine/stdio/src/term.rs index f6cb8075781..e318b243105 100644 --- a/src/rust/engine/stdio/src/term.rs +++ b/src/rust/engine/stdio/src/term.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::fs::File; use std::io::{Read, Write}; use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; diff --git a/src/rust/engine/testutil/mock/src/cas.rs b/src/rust/engine/testutil/mock/src/cas.rs index 53e5a370fde..243167e3c61 100644 --- a/src/rust/engine/testutil/mock/src/cas.rs +++ b/src/rust/engine/testutil/mock/src/cas.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::HashMap; use std::net::SocketAddr; use std::sync::atomic::AtomicBool; diff --git a/src/rust/engine/testutil/mock/src/cas_service.rs b/src/rust/engine/testutil/mock/src/cas_service.rs index de855a1ae36..bf1eea97b91 100644 --- a/src/rust/engine/testutil/mock/src/cas_service.rs +++ b/src/rust/engine/testutil/mock/src/cas_service.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::HashMap; use std::convert::TryInto; use std::pin::Pin; diff --git a/src/rust/engine/testutil/mock/src/execution_server.rs b/src/rust/engine/testutil/mock/src/execution_server.rs index 571cdeec1a3..f0a7c7224ba 100644 --- a/src/rust/engine/testutil/mock/src/execution_server.rs +++ b/src/rust/engine/testutil/mock/src/execution_server.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::any::type_name; use std::collections::VecDeque; use std::fmt::Debug; diff --git a/src/rust/engine/testutil/src/data.rs b/src/rust/engine/testutil/src/data.rs index 312c1fdace9..413675cf176 100644 --- a/src/rust/engine/testutil/src/data.rs +++ b/src/rust/engine/testutil/src/data.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use grpc_util::prost::MessageExt; use protos::gen::build::bazel::remote::execution::v2 as remexec; diff --git a/src/rust/engine/testutil/src/file.rs b/src/rust/engine/testutil/src/file.rs index 91ee686867a..4e0c46a2fe6 100644 --- a/src/rust/engine/testutil/src/file.rs +++ b/src/rust/engine/testutil/src/file.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::io::Read; use std::os::unix::fs::PermissionsExt; use std::path::Path; diff --git a/src/rust/engine/testutil/src/path.rs b/src/rust/engine/testutil/src/path.rs index 740274d6679..9168597ef12 100644 --- a/src/rust/engine/testutil/src/path.rs +++ b/src/rust/engine/testutil/src/path.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::env; use std::path::PathBuf; diff --git a/src/rust/engine/watch/src/tests.rs b/src/rust/engine/watch/src/tests.rs index ff484e30127..645056f8464 100644 --- a/src/rust/engine/watch/src/tests.rs +++ b/src/rust/engine/watch/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use crate::{Invalidatable, InvalidationWatcher}; use std::collections::HashSet; diff --git a/src/rust/engine/workunit_store/src/tests.rs b/src/rust/engine/workunit_store/src/tests.rs index 74017fcb049..f1136f4e307 100644 --- a/src/rust/engine/workunit_store/src/tests.rs +++ b/src/rust/engine/workunit_store/src/tests.rs @@ -1,3 +1,5 @@ +// Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). +// Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::HashSet; use std::sync::atomic; use std::time::Duration;