mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Add missing licenses and tune the scanning workflow (#1288)
* Add missing Cumulus licenses * Typo * Add missing Substrate licenses * Single job checking the sub-repos in steps * Remove dates * Remove dates * Add missing (C) * Update FRAME UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update more UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Benchmark parameter names must consist of a single lowercase letter (a-z) and no other characters.
|
||||
--> tests/benchmark_ui/bad_param_name.rs:10:11
|
||||
--> tests/benchmark_ui/bad_param_name.rs:27:11
|
||||
|
|
||||
10 | fn bench(winton: Linear<1, 2>) {
|
||||
27 | fn bench(winton: Linear<1, 2>) {
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Benchmark parameter names must consist of a single lowercase letter (a-z) and no other characters.
|
||||
--> tests/benchmark_ui/bad_param_name_too_long.rs:8:11
|
||||
|
|
||||
8 | fn bench(xx: Linear<1, 2>) {
|
||||
| ^^
|
||||
--> tests/benchmark_ui/bad_param_name_too_long.rs:25:11
|
||||
|
|
||||
25 | fn bench(xx: Linear<1, 2>) {
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Benchmark parameter names must consist of a single lowercase letter (a-z) and no other characters.
|
||||
--> tests/benchmark_ui/bad_param_name_upper_case.rs:8:11
|
||||
|
|
||||
8 | fn bench(D: Linear<1, 2>) {
|
||||
| ^
|
||||
--> tests/benchmark_ui/bad_param_name_upper_case.rs:25:11
|
||||
|
|
||||
25 | fn bench(D: Linear<1, 2>) {
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid benchmark function param. A valid example would be `x: Linear<5, 10>`.
|
||||
--> tests/benchmark_ui/bad_params.rs:10:31
|
||||
--> tests/benchmark_ui/bad_params.rs:27:31
|
||||
|
|
||||
10 | fn bench(y: Linear<1, 2>, x: u32) {
|
||||
27 | fn bench(y: Linear<1, 2>, x: u32) {
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `BenchmarkError`
|
||||
--> tests/benchmark_ui/bad_return_non_benchmark_err.rs:10:27
|
||||
--> tests/benchmark_ui/bad_return_non_benchmark_err.rs:27:27
|
||||
|
|
||||
10 | fn bench() -> Result<(), BenchmarkException> {
|
||||
27 | fn bench() -> Result<(), BenchmarkException> {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Only `Result<(), BenchmarkError>` or a blank return type is allowed on benchmark function definitions
|
||||
--> tests/benchmark_ui/bad_return_non_type_path.rs:10:16
|
||||
--> tests/benchmark_ui/bad_return_non_type_path.rs:27:16
|
||||
|
|
||||
10 | fn bench() -> (String, u32) {
|
||||
27 | fn bench() -> (String, u32) {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `()`
|
||||
--> tests/benchmark_ui/bad_return_non_unit_t.rs:8:23
|
||||
|
|
||||
8 | fn bench() -> Result<u32, BenchmarkError> {
|
||||
| ^^^
|
||||
--> tests/benchmark_ui/bad_return_non_unit_t.rs:25:23
|
||||
|
|
||||
25 | fn bench() -> Result<u32, BenchmarkError> {
|
||||
| ^^^
|
||||
|
||||
+17
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
||||
--> tests/benchmark_ui/bad_return_type_blank_with_question.rs:15:14
|
||||
--> tests/benchmark_ui/bad_return_type_blank_with_question.rs:32:14
|
||||
|
|
||||
5 | #[benchmarks]
|
||||
22 | #[benchmarks]
|
||||
| ------------- this function should return `Result` or `Option` to accept `?`
|
||||
...
|
||||
15 | something()?;
|
||||
32 | something()?;
|
||||
| ^ cannot use the `?` operator in a function that returns `()`
|
||||
|
|
||||
= help: the trait `FromResidual<Result<Infallible, frame_benchmarking::BenchmarkError>>` is not implemented for `()`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error: Benchmark `#[block]` or `#[extrinsic_call]` item cannot be the last statement of your benchmark function definition if you have defined a return type. You should return something compatible with Result<(), BenchmarkError> (i.e. `Ok(())`) as the last statement or change your signature to a blank return type.
|
||||
--> tests/benchmark_ui/bad_return_type_no_last_stmt.rs:10:43
|
||||
--> tests/benchmark_ui/bad_return_type_no_last_stmt.rs:27:43
|
||||
|
|
||||
10 | fn bench() -> Result<(), BenchmarkError> {
|
||||
27 | fn bench() -> Result<(), BenchmarkError> {
|
||||
| ______________________________________________^
|
||||
11 | | #[block]
|
||||
12 | | {}
|
||||
13 | | }
|
||||
28 | | #[block]
|
||||
29 | | {}
|
||||
30 | | }
|
||||
| |_____^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `Result`
|
||||
--> tests/benchmark_ui/bad_return_type_non_result.rs:10:31
|
||||
--> tests/benchmark_ui/bad_return_type_non_result.rs:27:31
|
||||
|
|
||||
10 | fn bench(y: Linear<1, 2>) -> String {
|
||||
27 | fn bench(y: Linear<1, 2>) -> String {
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `Result`
|
||||
--> tests/benchmark_ui/bad_return_type_option.rs:10:16
|
||||
--> tests/benchmark_ui/bad_return_type_option.rs:27:16
|
||||
|
|
||||
10 | fn bench() -> Option<BenchmarkError> {
|
||||
27 | fn bench() -> Option<BenchmarkError> {
|
||||
| ^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Only one #[extrinsic_call] or #[block] attribute is allowed per benchmark.
|
||||
--> tests/benchmark_ui/dup_block.rs:14:3
|
||||
--> tests/benchmark_ui/dup_block.rs:31:3
|
||||
|
|
||||
14 | #[block]
|
||||
31 | #[block]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Only one #[extrinsic_call] or #[block] attribute is allowed per benchmark.
|
||||
--> tests/benchmark_ui/dup_extrinsic_call.rs:14:3
|
||||
--> tests/benchmark_ui/dup_extrinsic_call.rs:31:3
|
||||
|
|
||||
14 | #[extrinsic_call]
|
||||
31 | #[extrinsic_call]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: No valid #[extrinsic_call] or #[block] annotation could be found in benchmark function body.
|
||||
--> tests/benchmark_ui/empty_function.rs:10:13
|
||||
--> tests/benchmark_ui/empty_function.rs:27:13
|
||||
|
|
||||
10 | fn bench() {}
|
||||
27 | fn bench() {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unexpected end of input, `extra` can only be specified once
|
||||
--> tests/benchmark_ui/extra_extra.rs:9:26
|
||||
|
|
||||
9 | #[benchmark(extra, extra)]
|
||||
| ^
|
||||
--> tests/benchmark_ui/extra_extra.rs:26:26
|
||||
|
|
||||
26 | #[benchmark(extra, extra)]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: unexpected end of input, `skip_meta` can only be specified once
|
||||
--> tests/benchmark_ui/extra_skip_meta.rs:9:34
|
||||
|
|
||||
9 | #[benchmark(skip_meta, skip_meta)]
|
||||
| ^
|
||||
--> tests/benchmark_ui/extra_skip_meta.rs:26:34
|
||||
|
|
||||
26 | #[benchmark(skip_meta, skip_meta)]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
|
||||
#[extrinsic_call]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: `#[extrinsic_call]` must be in a benchmark function definition labeled with `#[benchmark]`.
|
||||
--> tests/benchmark_ui/extrinsic_call_out_of_fn.rs:3:1
|
||||
|
|
||||
3 | #[extrinsic_call]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `extrinsic_call` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
--> tests/benchmark_ui/extrinsic_call_out_of_fn.rs:20:1
|
||||
|
|
||||
20 | #[extrinsic_call]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `extrinsic_call` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
error[E0277]: the trait bound `<T as frame_support_test::Config>::RuntimeOrigin: From<{integer}>` is not satisfied
|
||||
--> tests/benchmark_ui/invalid_origin.rs:6:1
|
||||
|
|
||||
6 | #[benchmarks]
|
||||
| ^^^^^^^^^^^^^ the trait `From<{integer}>` is not implemented for `<T as frame_support_test::Config>::RuntimeOrigin`
|
||||
|
|
||||
= note: required for `{integer}` to implement `Into<<T as frame_support_test::Config>::RuntimeOrigin>`
|
||||
= note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
--> tests/benchmark_ui/invalid_origin.rs:23:1
|
||||
|
|
||||
23 | #[benchmarks]
|
||||
| ^^^^^^^^^^^^^ the trait `From<{integer}>` is not implemented for `<T as frame_support_test::Config>::RuntimeOrigin`
|
||||
|
|
||||
= note: required for `{integer}` to implement `Into<<T as frame_support_test::Config>::RuntimeOrigin>`
|
||||
= note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
error: No valid #[extrinsic_call] or #[block] annotation could be found in benchmark function body.
|
||||
--> tests/benchmark_ui/missing_call.rs:10:13
|
||||
--> tests/benchmark_ui/missing_call.rs:27:13
|
||||
|
|
||||
10 | fn bench() {
|
||||
27 | fn bench() {
|
||||
| ________________^
|
||||
11 | | assert_eq!(2 + 2, 4);
|
||||
12 | | }
|
||||
28 | | assert_eq!(2 + 2, 4);
|
||||
29 | | }
|
||||
| |_____^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Single-item extrinsic calls must specify their origin as the first argument.
|
||||
--> tests/benchmark_ui/missing_origin.rs:12:3
|
||||
--> tests/benchmark_ui/missing_origin.rs:29:3
|
||||
|
|
||||
12 | thing();
|
||||
29 | thing();
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_support_test::Config;
|
||||
|
||||
|
||||
+17
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_support_test::Config;
|
||||
use frame_support::parameter_types;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
+17
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_support_test::Config;
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `extra` or `skip_meta`
|
||||
--> tests/benchmark_ui/unrecognized_option.rs:9:32
|
||||
|
|
||||
9 | #[benchmark(skip_meta, extra, bad)]
|
||||
| ^^^
|
||||
--> tests/benchmark_ui/unrecognized_option.rs:26:32
|
||||
|
|
||||
26 | #[benchmark(skip_meta, extra, bad)]
|
||||
| ^^^
|
||||
|
||||
Reference in New Issue
Block a user