Remove @author from copyright statements.
We have git to track authorship, so let's not pad source files with it as well. Co-authored-by: Joe Gordon <joe.gordon0@gmail.com> Change-Id: Ic2d62d6743f7716c086749cd99922b6c496771d4
This commit is contained in:
parent
93a4c72921
commit
58f5579630
@ -22,6 +22,8 @@ Nova Specific Commandments
|
||||
- [N313] capitalize help string
|
||||
Config parameter help strings should have a capitalized first letter
|
||||
- [N314] vim configuration should not be kept in source files.
|
||||
- [N315] We do not use @authors tags in source files. We have git to track
|
||||
authorship.
|
||||
|
||||
Creating Unit Tests
|
||||
-------------------
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2013 OpenStack Foundation
|
||||
# Author: Yingjun Li <liyingjun1988@gmail.com>
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2011 Cloudscaling, Inc.
|
||||
# Author: Matthew Hooker <matt@cloudscaling.com>
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Shane Wang, Intel Corporation.
|
||||
|
||||
"""
|
||||
Resource monitor API specification.
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Shane Wang, Intel Corporation.
|
||||
|
||||
"""
|
||||
CPU monitor to retrieve CPU information
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Shane Wang, Intel Corporation.
|
||||
|
||||
from nova.compute.monitors.virt import cpu_monitor
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Shane Wang, Intel Corporation.
|
||||
|
||||
"""
|
||||
CPU monitor based on compute driver to retrieve CPU information
|
||||
|
@ -11,8 +11,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Shane Wang, Intel Corporation
|
||||
|
||||
from sqlalchemy import Column
|
||||
from sqlalchemy import MetaData
|
||||
|
@ -37,6 +37,7 @@ virt_import_re = re.compile(
|
||||
r"^\s*(?:import|from) nova\.(?:tests\.)?virt\.(\w+)")
|
||||
virt_config_re = re.compile(
|
||||
r"CONF\.import_opt\('.*?', 'nova\.virt\.(\w+)('|.)")
|
||||
author_tag_re = re.compile("^\s*#\s*@?(a|A)uthor:")
|
||||
|
||||
|
||||
def import_no_db_in_virt(logical_line, filename):
|
||||
@ -146,6 +147,12 @@ def no_vi_headers(physical_line, line_number, lines):
|
||||
return 0, "N314: Don't put vi configuration in source files"
|
||||
|
||||
|
||||
def no_author_tags(physical_line):
|
||||
if author_tag_re.match(physical_line):
|
||||
pos = physical_line.find('author')
|
||||
return pos, "N315: Don't use author tags"
|
||||
|
||||
|
||||
def factory(register):
|
||||
register(import_no_db_in_virt)
|
||||
register(no_db_session_in_public_api)
|
||||
@ -154,3 +161,4 @@ def factory(register):
|
||||
register(import_no_virt_driver_config_deps)
|
||||
register(capital_cfg_help)
|
||||
register(no_vi_headers)
|
||||
register(no_author_tags)
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Yong Sheng Gong, UnitedStack Inc.
|
||||
|
||||
NET_EXTERNAL = 'router:external'
|
||||
PORTBINDING_EXT = 'Port Binding'
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Copyright 2013 Nicira, Inc.
|
||||
# All Rights Reserved
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Aaron Rosen, Nicira Networks, Inc.
|
@ -12,8 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Aaron Rosen, Nicira Networks, Inc.
|
||||
|
||||
import sys
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Aaron Rosen, Nicira Networks, Inc.
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Aaron Rosen, Nicira Networks, Inc.
|
||||
|
||||
import urllib
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Yongli He, Intel Corporation.
|
||||
|
||||
import copy
|
||||
import functools
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Yongli He, Intel Corporation.
|
||||
|
||||
""" Example of a PCI alias:
|
||||
pci_alias = '{
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2012 Cloudscaling, Inc.
|
||||
# Author: Joe Gordon <jogo@cloudscaling.com>
|
||||
# All Rights Reserved.
|
||||
# Copyright 2013 Red Hat, Inc.
|
||||
#
|
||||
|
@ -12,8 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# @author: Aaron Rosen, Nicira Networks, Inc.
|
||||
|
||||
import uuid
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2011 Cloudscaling, Inc.
|
||||
# Author: Matthew Hooker <matt@cloudscaling.com>
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2011 OpenStack Foundation
|
||||
# Author: Soren Hansen
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# @author: Yongli He, Intel Corporation.
|
||||
|
||||
"""Tests for PCI request."""
|
||||
|
||||
|
@ -48,3 +48,10 @@ class HackingTestCase(test.NoDBTestCase):
|
||||
"CONF.import_opt('volume_drivers', "
|
||||
"'nova.virt.libvirt.driver', group='libvirt')",
|
||||
"./nova/virt/libvirt/volume.py"))
|
||||
|
||||
def test_virt_driver_imports(self):
|
||||
self.assertTrue(checks.no_author_tags("# author: jogo"))
|
||||
self.assertTrue(checks.no_author_tags("# @author: jogo"))
|
||||
self.assertTrue(checks.no_author_tags("# @Author: jogo"))
|
||||
self.assertTrue(checks.no_author_tags("# Author: jogo"))
|
||||
self.assertFalse(checks.no_author_tags("# authorization of this"))
|
||||
|
@ -1,7 +1,5 @@
|
||||
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# Author: Cyril Roelandt <cyril.roelandt@enovance.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
|
Loading…
Reference in New Issue
Block a user