Skip to content

Commit 9f1577d

Browse files
authored
pre-commit: check more file types for trailing whitespace (#9352)
1 parent 806692b commit 9f1577d

File tree

90 files changed

+347
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+347
-346
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ repos:
5959
- id: mixed-line-ending
6060
exclude: \.(cs|xml)$
6161
- id: trailing-whitespace
62-
files: \.(in|java|md|py|rb|sh|vue|yaml|yml)$
62+
files: \.(header|in|java|md|properties|py|rb|sh|sql|txt|vue|yaml|yml)$
6363
args: [--markdown-linebreak-ext=md]
64+
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
6465
- repo: https://github.com/pycqa/flake8
6566
rev: 7.0.0
6667
hooks:

build/replace.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

engine/schema/src/main/resources/META-INF/db/data-217to218.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

engine/schema/src/main/resources/META-INF/db/schema-20to21.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -141,14 +141,14 @@ ALTER TABLE `cloud`.`host` ADD COLUMN `cluster_id` bigint unsigned;
141141

142142
--
143143
-- enforced in postporcess-20to21.sql
144-
ALTER TABLE `cloud`.`host_pod_ref` ADD COLUMN `gateway` varchar(255); -- need to migrage data with user input
144+
ALTER TABLE `cloud`.`host_pod_ref` ADD COLUMN `gateway` varchar(255); -- need to migrage data with user input
145145

146-
ALTER TABLE `cloud`.`service_offering` ADD COLUMN `recreatable` tinyint(1) unsigned NOT NULL DEFAULT 0;
146+
ALTER TABLE `cloud`.`service_offering` ADD COLUMN `recreatable` tinyint(1) unsigned NOT NULL DEFAULT 0;
147147
ALTER TABLE `cloud`.`service_offering` ADD COLUMN `tags` varchar(255);
148148

149-
ALTER TABLE `cloud`.`user_vm` MODIFY COLUMN `domain_router_id` bigint unsigned; -- change from NOT NULL to NULL
149+
ALTER TABLE `cloud`.`user_vm` MODIFY COLUMN `domain_router_id` bigint unsigned; -- change from NOT NULL to NULL
150150

151-
ALTER TABLE `cloud`.`event` ADD COLUMN `state` varchar(32) NOT NULL DEFAULT 'Completed';
151+
ALTER TABLE `cloud`.`event` ADD COLUMN `state` varchar(32) NOT NULL DEFAULT 'Completed';
152152
ALTER TABLE `cloud`.`event` ADD COLUMN `start_id` bigint unsigned NOT NULL DEFAULT 0;
153153

154154
ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `tags` varchar(4096);

engine/schema/src/main/resources/META-INF/db/schema-217to218.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

engine/schema/src/main/resources/META-INF/db/schema-21to22-cleanup.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

engine/schema/src/main/resources/META-INF/db/schema-21to22-premium.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -50,7 +50,7 @@ CREATE TABLE `cloud_usage`.`usage_event` (
5050
`resource_name` varchar(255),
5151
`offering_id` bigint unsigned,
5252
`template_id` bigint unsigned,
53-
`size` bigint unsigned,
53+
`size` bigint unsigned,
5454
`processed` tinyint NOT NULL default '0',
5555
PRIMARY KEY (`id`)
5656
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

engine/schema/src/main/resources/META-INF/db/schema-21to22.sql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,7 +22,7 @@ ALTER TABLE `cloud`.`cluster` ADD COLUMN `guid` varchar(255) UNIQUE DEFAULT NULL
2222
ALTER TABLE `cloud`.`cluster` ADD COLUMN `cluster_type` varchar(64) DEFAULT 'CloudManaged';
2323
ALTER TABLE `cloud`.`vm_template` ADD COLUMN `hypervisor_type` varchar(32) COMMENT 'hypervisor that the template is belonged to';
2424
ALTER TABLE `cloud`.`vm_template` ADD COLUMN `extractable` int(1) unsigned NOT NULL default 0 COMMENT 'Is this template extractable';
25-
ALTER TABLE `cloud`.`template_spool_ref` ADD CONSTRAINT `fk_template_spool_ref__template_id` FOREIGN KEY (`template_id`) REFERENCES `vm_template`(`id`);
25+
ALTER TABLE `cloud`.`template_spool_ref` ADD CONSTRAINT `fk_template_spool_ref__template_id` FOREIGN KEY (`template_id`) REFERENCES `vm_template`(`id`);
2626

2727
ALTER TABLE `cloud`.`guest_os` modify `name` varchar(255) ;
2828

@@ -104,7 +104,7 @@ CREATE TABLE `cloud`.`networks` (
104104
`broadcast_domain_type` varchar(32) NOT NULL COMMENT 'type of broadcast domain used',
105105
`broadcast_uri` varchar(255) COMMENT 'broadcast domain specifier',
106106
`gateway` varchar(15) COMMENT 'gateway for this network configuration',
107-
`cidr` varchar(18) COMMENT 'network cidr',
107+
`cidr` varchar(18) COMMENT 'network cidr',
108108
`mode` varchar(32) COMMENT 'How to retrieve ip address in this network',
109109
`network_offering_id` bigint unsigned NOT NULL COMMENT 'network offering id that this configuration is created from',
110110
`data_center_id` bigint unsigned NOT NULL COMMENT 'data center id that this configuration is used in',
@@ -167,7 +167,7 @@ CREATE TABLE `cloud`.`nics` (
167167
`ip_type` varchar(32) COMMENT 'type of ip',
168168
`broadcast_uri` varchar(255) COMMENT 'broadcast uri',
169169
`network_id` bigint unsigned NOT NULL COMMENT 'network configuration id',
170-
`mode` varchar(32) COMMENT 'mode of getting ip address',
170+
`mode` varchar(32) COMMENT 'mode of getting ip address',
171171
`state` varchar(32) NOT NULL COMMENT 'state of the creation',
172172
`strategy` varchar(32) NOT NULL COMMENT 'reservation strategy',
173173
`reserver_name` varchar(255) COMMENT 'Name of the component that reserved the ip address',
@@ -176,7 +176,7 @@ CREATE TABLE `cloud`.`nics` (
176176
`update_time` timestamp NOT NULL COMMENT 'time the state was changed',
177177
`isolation_uri` varchar(255) COMMENT 'id for isolation',
178178
`ip6_address` char(40) COMMENT 'ip6 address',
179-
`default_nic` tinyint NOT NULL COMMENT "None",
179+
`default_nic` tinyint NOT NULL COMMENT "None",
180180
`created` datetime NOT NULL COMMENT 'date created',
181181
`removed` datetime COMMENT 'date removed if not null',
182182
PRIMARY KEY (`id`),
@@ -253,23 +253,23 @@ CREATE TABLE `cloud`.`op_host` (
253253
`id` bigint unsigned NOT NULL UNIQUE COMMENT 'host id',
254254
`sequence` bigint unsigned DEFAULT 1 NOT NULL COMMENT 'sequence for the host communication',
255255
PRIMARY KEY (`id`),
256-
CONSTRAINT `fk_op_host__id` FOREIGN KEY (`id`) REFERENCES `host`(`id`) ON DELETE CASCADE
256+
CONSTRAINT `fk_op_host__id` FOREIGN KEY (`id`) REFERENCES `host`(`id`) ON DELETE CASCADE
257257
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
258258

259259
CREATE TABLE `cloud`.`guest_os_hypervisor` (
260260
`id` bigint unsigned NOT NULL auto_increment,
261261
`hypervisor_type` varchar(32) NOT NULL,
262262
`guest_os_name` varchar(255) NOT NULL,
263263
`guest_os_id` bigint unsigned NOT NULL,
264-
PRIMARY KEY (`id`)
264+
PRIMARY KEY (`id`)
265265
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
266266

267267
INSERT INTO op_host(id, sequence) select id, sequence from host;
268268

269269
-- Alter Tables to add Columns;
270270

271271
ALTER TABLE `cloud`.`cluster` ADD COLUMN `hypervisor_type` varchar(32);
272-
UPDATE `cloud`.`cluster` SET hypervisor_type=(SELECT DISTINCT host.hypervisor_type from host where host.cluster_id = cluster.id GROUP BY host.hypervisor_type);
272+
UPDATE `cloud`.`cluster` SET hypervisor_type=(SELECT DISTINCT host.hypervisor_type from host where host.cluster_id = cluster.id GROUP BY host.hypervisor_type);
273273

274274
ALTER TABLE `cloud`.`volumes` ADD COLUMN `attached` datetime;
275275
UPDATE `cloud`.`volumes` SET attached=now() WHERE removed IS NULL AND instance_id IS NOT NULL;
@@ -286,7 +286,7 @@ ALTER TABLE `cloud`.`vlan` ADD COLUMN `network_id` bigint unsigned NOT NULL;
286286

287287
ALTER TABLE `cloud`.`data_center` ADD COLUMN `domain` varchar(100);
288288
ALTER TABLE `cloud`.`data_center` ADD COLUMN `domain_id` bigint unsigned;
289-
ALTER TABLE `cloud`.`data_center` ADD COLUMN `networktype` varchar(255) NOT NULL DEFAULT 'Basic';
289+
ALTER TABLE `cloud`.`data_center` ADD COLUMN `networktype` varchar(255) NOT NULL DEFAULT 'Basic';
290290
ALTER TABLE `cloud`.`data_center` ADD COLUMN `dns_provider` char(64) DEFAULT 'VirtualRouter';
291291
ALTER TABLE `cloud`.`data_center` ADD COLUMN `gateway_provider` char(64) DEFAULT 'VirtualRouter';
292292
ALTER TABLE `cloud`.`data_center` ADD COLUMN `firewall_provider` char(64) DEFAULT 'VirtualRouter';
@@ -306,7 +306,7 @@ UPDATE `cloud`.`op_dc_link_local_ip_address_alloc` SET reservation_id=concat(cas
306306
ALTER TABLE `cloud`.`host_pod_ref` ADD COLUMN `enabled` tinyint NOT NULL DEFAULT 1;
307307

308308
ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD COLUMN `reservation_id` char(40) NULL;
309-
UPDATE op_dc_vnet_alloc set reservation_id=concat(cast(data_center_id as CHAR), concat("-", vnet)) WHERE taken is NOT NULL;
309+
UPDATE op_dc_vnet_alloc set reservation_id=concat(cast(data_center_id as CHAR), concat("-", vnet)) WHERE taken is NOT NULL;
310310

311311
ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `service_offering_id` bigint unsigned NOT NULL;
312312
ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `reservation_id` char(40);
@@ -326,7 +326,7 @@ ALTER TABLE `cloud`.`user_vm` ADD COLUMN `display_name` varchar(255);
326326
UPDATE user_vm inner join vm_instance on user_vm.id=vm_instance.id set user_vm.iso_id=vm_instance.iso_id, user_vm.display_name=vm_instance.display_name where vm_instance.type='User';
327327

328328
ALTER TABLE `cloud`.`template_host_ref` ADD COLUMN `physical_size` bigint unsigned DEFAULT 0;
329-
UPDATE template_host_ref INNER JOIN template_spool_ref ON template_host_ref.template_id=template_spool_ref.template_id SET template_host_ref.physical_size=template_spool_ref.template_size;
329+
UPDATE template_host_ref INNER JOIN template_spool_ref ON template_host_ref.template_id=template_spool_ref.template_id SET template_host_ref.physical_size=template_spool_ref.template_size;
330330

331331

332332
CREATE TABLE `cloud`.`user_vm_details` (
@@ -412,7 +412,7 @@ CREATE TABLE `cloud`.`vpn_users` (
412412
CONSTRAINT `fk_vpn_users__owner_id` FOREIGN KEY (`owner_id`) REFERENCES `account`(`id`) ON DELETE CASCADE,
413413
CONSTRAINT `fk_vpn_users__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain`(`id`) ON DELETE CASCADE,
414414
INDEX `i_vpn_users_username`(`username`),
415-
UNIQUE `i_vpn_users__account_id__username`(`owner_id`, `username`)
415+
UNIQUE `i_vpn_users__account_id__username`(`owner_id`, `username`)
416416
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
417417

418418
ALTER TABLE `cloud`.`storage_pool` ADD COLUMN `status` varchar(32);
@@ -490,7 +490,7 @@ CREATE TABLE `cloud`.`usage_event` (
490490
`resource_name` varchar(255),
491491
`offering_id` bigint unsigned,
492492
`template_id` bigint unsigned,
493-
`size` bigint unsigned,
493+
`size` bigint unsigned,
494494
`processed` tinyint NOT NULL default '0',
495495
PRIMARY KEY (`id`)
496496
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

engine/schema/src/main/resources/META-INF/db/schema-2210to2211.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

engine/schema/src/main/resources/META-INF/db/schema-2211to2212-premium.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-- to you under the Apache License, Version 2.0 (the
66
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
8-
--
8+
--
99
-- http://www.apache.org/licenses/LICENSE-2.0
10-
--
10+
--
1111
-- Unless required by applicable law or agreed to in writing,
1212
-- software distributed under the License is distributed on an
1313
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

0 commit comments

Comments
 (0)