health-check: enforce blank line after copyright

While we are tweaking all of the copyright headers, let's take the
opportunity to ensure there is always a blank line after the copyright
header for consistency. (Almost all files already follow this style.)

This includes a slightly ugly regex to allow the end of a C-style
comment block after the end of the copyright:

/*
 * Example comment block
 */   <-- this line

Change-Id: Idfd0855861e5ecb3d33afae942fdba908af0dcff
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892521
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Daniel Verkamp 2022-09-13 12:37:28 -07:00 committed by crosvm LUCI
parent 30b531a933
commit 7c6d8bec3f
43 changed files with 47 additions and 16 deletions

View file

@ -2,4 +2,5 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
echo "./bin/clippy is deprecated. Please use: ./tools/clippy"

View file

@ -2,4 +2,5 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
echo "./bin/fmt is deprecated. Please use: ./tools/fmt"

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Note: To simulate this locally, sudo needs to be passwordless for the duration of the build (~1h).
# This could be achieved by refreshing sudo in the background before running ci/simulate.py:
#

View file

@ -2,6 +2,7 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
# Python script to check for at least version 3.9

View file

@ -2,6 +2,7 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source "$(dirname $0)/common.sh"
./tools/dev_container --self-test

View file

@ -1,6 +1,7 @@
// Copyright 2019 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! ```
//! use audio_streams::{BoxError, capture::CaptureBuffer, SampleFormat, StreamSource,
//! NoopStreamSource};

View file

@ -1,7 +1,7 @@
// Copyright 2019 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Software implementation of an Intel 8259A Programmable Interrupt Controller
// This is a legacy device used by older OSs and briefly during start-up by
// modern OSs that use a legacy BIOS.

View file

@ -1,6 +1,7 @@
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::cmp::max;
use std::cmp::min;
use std::sync::Arc;

View file

@ -1,6 +1,7 @@
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::sync::Arc;
use data_model::DataInit;

View file

@ -1,6 +1,7 @@
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::collections::BTreeMap;
use std::sync::Arc;

View file

@ -1,6 +1,7 @@
// Copyright 2019 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Based heavily on GCE VMM's pit.cc.
use std::io::Error as IoError;

View file

@ -1,6 +1,7 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::fs::File;
use std::sync::Arc;
use std::u32;

View file

@ -1,6 +1,7 @@
// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
pub const VIRTIO_SND_R_JACK_INFO: u32 = 1;
pub const VIRTIO_SND_R_JACK_REMAP: u32 = 2;

View file

@ -1,6 +1,7 @@
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! Utility features shared by both the decoder and encoder VDA backends.
use crate::virtio::video::error::VideoError;

View file

@ -1,6 +1,7 @@
// Copyright 2019 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define XUTIL_DEFINE_FUNCTIONS
#include <X11/Xlib.h>
#include <X11/Xutil.h>

View file

@ -2,6 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -ex
BUILD_DIR=$(mktemp -d)

View file

@ -1,6 +1,7 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
pub mod fixture;
use fixture::Config;
use fixture::TestVm;

View file

@ -1,6 +1,7 @@
// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
pub mod fixture;
use fixture::Config;
use fixture::TestVm;

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate io_uring bindgen bindings.
set -euo pipefail

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate kernel_loader bindgen bindings.
set -euo pipefail

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate kvm_sys bindgen bindings.
set -euo pipefail

View file

@ -1,3 +1,5 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This space intentionally left blank.

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate ffmpeg bindgen bindings.
set -euo pipefail

View file

@ -1,6 +1,7 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use pkg_config::Config;
fn main() {

View file

@ -2,8 +2,9 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate libva bindgen bindings.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
source tools/impl/bindgen-common.sh

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate libvda bindgen bindings.
set -euo pipefail

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate net_sys bindgen bindings.
set -euo pipefail

View file

@ -1,7 +1,6 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
//! Contains the Rust implementation of the libslirp consumer main loop, high
//! level interfaces to libslirp that are used to implement that loop, and

View file

@ -3,6 +3,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#define _GNU_SOURCE
#include <assert.h>
#include <errno.h>

View file

@ -1,6 +1,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@include /usr/share/policy/crosvm/common_device.policy
# VFIO_IOMMU_MAP/UNMAP_DMA

View file

@ -1,6 +1,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@include /usr/share/policy/crosvm/common_device.policy
# VFIO_IOMMU_MAP/UNMAP_DMA

View file

@ -1,6 +1,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@include /usr/share/policy/crosvm/common_device.policy
# VFIO_IOMMU_MAP/UNMAP_DMA

View file

@ -1,6 +1,7 @@
# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@include /usr/share/policy/crosvm/common_device.policy
# VFIO_DEVICE_SET_IRQS, VFIO_IOMMU_MAP/UNMAP_DMA

View file

@ -2,5 +2,6 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
echo "./setup_cros_cargo.sh is deprecated. " \
"Please use: ./tools/chromeos/setup_cargo"

View file

@ -1,3 +1,5 @@
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This space intentionally left blank.

View file

@ -2,7 +2,7 @@
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Usage:
#
# To get an interactive shell for development:

View file

@ -111,6 +111,8 @@ LICENSE_HEADER_RE = (
r".*Copyright (?P<year>20[0-9]{2})(?:-20[0-9]{2})? The ChromiumOS Authors\n"
r".*Use of this source code is governed by a BSD-style license that can be\n"
r".*found in the LICENSE file\.\n"
r"( *\*/\n)?" # allow the end of a C-style comment before the blank line
r"\n"
)
NEW_LICENSE_HEADER = [

View file

@ -1,3 +1,5 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This space intentionally left blank.

View file

@ -1,7 +1,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Helper functions for bindgen scripts sourced by tools/bindgen-all-the-things.
# virtio-video bindings need some types that are only in the 5.10-arcvm branch.

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate vfio_sys bindgen bindings.
set -euo pipefail

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate virtio_sys bindgen bindings.
set -euo pipefail

View file

@ -2,7 +2,7 @@
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Regenerate virtio-gpu udmabuf bindgen bindings.
set -euo pipefail

View file

@ -1,7 +1,7 @@
// Copyright 2017 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// For GDT details see arch/x86/include/asm/segment.h
use hypervisor::Segment;