Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ crate.spec(
package = "serde_yaml",
version = "0.9",
)
crate.spec(
package = "strsim",
version = "0.11",
)
crate.spec(
package = "once_cell",
version = "1.19",
Expand Down
1 change: 1 addition & 0 deletions validation/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ rust_library(
"@crates//:log",
"@crates//:serde",
"@crates//:serde_json",
"@crates//:strsim",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
should_pass: false
error_contains: |
[Naming] Unit "unit_3" from the PlantUML component diagram not found in Bazel.
Alias : "unit_3"
Parent : component_example
Component source file : "validation/core/integration_test/bazel_component/negative_extra_unit/component_diagram.puml"
Component source line : 20
Fix : Add the corresponding Bazel unit definition for "unit_3", or remove it from the PlantUML component diagram.
Alias : "unit_3"
Parent : component_example
Component source file : "validation/core/integration_test/bazel_component/negative_extra_unit/component_diagram.puml"
Component source line : 20
Suggestion for "unit_3" : Did you mean unit "unit_1"?
Fix : Add the corresponding Bazel unit definition for "unit_3", or remove it from the PlantUML component diagram.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
should_pass: false
error_contains: |
[Naming] Unit "unit_2" from Bazel not found in the PlantUML component diagram.
Alias : "unit_2"
Parent : component_example
Stereotype : <<unit>>
Bazel label : @//bazel/rules/rules_score/examples/seooc/unit_2:unit_2
Fix : Add unit "unit_2" with stereotype <<unit>> in the PlantUML component diagram, or remove it from Bazel.
Alias : "unit_2"
Parent : component_example
Stereotype : <<unit>>
Bazel label : @//bazel/rules/rules_score/examples/seooc/unit_2:unit_2
Suggestion for "unit_2" : Did you mean unit "unit_1"?
Fix : Add unit "unit_2" with stereotype <<unit>> in the PlantUML component diagram, or remove it from Bazel.
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,32 @@ filegroup(
name = "class_design_implementation_test_data",
srcs = [
"//validation/core/integration_test/class_design_implementation/negative_class_member_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_class_missing_without_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_class_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_duplicate_class_entity_input:case_data",
"//validation/core/integration_test/class_design_implementation/negative_class_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_entity_type_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_enum_literal_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_enum_literal_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_enum_literal_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_modifier_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_parameter_count_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_parameter_name_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_parameter_type_mismatch:case_data",
# "//validation/core/integration_test/class_design_implementation/negative_method_parameter_variadic_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_visibility_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_method_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_relationship_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_relationship_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_relationship_type_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_template_parameter_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_template_parameter_pack_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_type_alias_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_type_alias_missing:case_data",
"//validation/core/integration_test/class_design_implementation/negative_type_alias_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_variable_missing_with_suggestion:case_data",
"//validation/core/integration_test/class_design_implementation/negative_variable_static_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_variable_visibility_mismatch:case_data",
"//validation/core/integration_test/class_design_implementation/negative_variable_mismatch:case_data",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,41 @@ fn negative_class_member_missing() {
assert_case("negative_class_member_missing");
}

#[test]
fn negative_class_missing_with_suggestion() {
assert_case("negative_class_missing_with_suggestion");
}

#[test]
fn negative_class_missing_without_suggestion() {
assert_case("negative_class_missing_without_suggestion");
}

#[test]
fn negative_type_alias_missing_with_suggestion() {
assert_case("negative_type_alias_missing_with_suggestion");
}

#[test]
fn negative_variable_missing_with_suggestion() {
assert_case("negative_variable_missing_with_suggestion");
}

#[test]
fn negative_method_missing_with_suggestion() {
assert_case("negative_method_missing_with_suggestion");
}

#[test]
fn negative_enum_literal_missing_with_suggestion() {
assert_case("negative_enum_literal_missing_with_suggestion");
}

#[test]
fn negative_relationship_missing_with_suggestion() {
assert_case("negative_relationship_missing_with_suggestion");
}

#[test]
fn negative_duplicate_class_entity_input() {
assert_case("negative_duplicate_class_entity_input");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("//bazel/rules/rules_score:rules_score.bzl", "unit", "unit_design")
load("//validation/core/integration_test:puml_fixture.bzl", "provider_fbs_fixture_bundle")

unit_design(
name = "unit_design",
static = ["class_diagram.puml"],
visibility = ["//visibility:private"],
)

cc_library(
name = "transport",
srcs = ["transport.cpp"],
)

unit(
name = "unit",
testonly = False,
maturity = "development",
tests = [],
unit_design = [":unit_design"],
visibility = ["//visibility:private"],
implementation = [":transport"],
)

provider_fbs_fixture_bundle(
name = "fbs",
visibility = ["//visibility:private"],
deps = [
":unit",
":unit_design",
],
)

filegroup(
name = "case_data",
srcs = [
"expected.yaml",
":fbs",
],
visibility = ["//validation/core/integration_test:__subpackages__"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml

class ControlPanel

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
should_pass: false
error_contains: |-
[Class] Class "ControlPanel" from the unit design not found in the C++ class implementation.
Class : "ControlPanel"
Design source file : "validation/core/integration_test/class_design_implementation/negative_class_missing_with_suggestion/class_diagram.puml"
Design source line : 16
Suggestion for "ControlPanel" : Did you mean class "ControlPanl"?
Fix : Add implementation class "ControlPanel" in the C++ class implementation, or remove it from the unit design.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

class ControlPanl
{
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("//bazel/rules/rules_score:rules_score.bzl", "unit", "unit_design")
load("//validation/core/integration_test:puml_fixture.bzl", "provider_fbs_fixture_bundle")

unit_design(
name = "unit_design",
static = ["class_diagram.puml"],
visibility = ["//visibility:private"],
)

cc_library(
name = "transport",
srcs = ["transport.cpp"],
)

unit(
name = "unit",
testonly = False,
maturity = "development",
tests = [],
unit_design = [":unit_design"],
visibility = ["//visibility:private"],
implementation = [":transport"],
)

provider_fbs_fixture_bundle(
name = "fbs",
visibility = ["//visibility:private"],
deps = [
":unit",
":unit_design",
],
)

filegroup(
name = "case_data",
srcs = [
"expected.yaml",
":fbs",
],
visibility = ["//validation/core/integration_test:__subpackages__"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
' *******************************************************************************
' Copyright (c) 2026 Contributors to the Eclipse Foundation
'
' See the NOTICE file(s) distributed with this work for additional
' information regarding copyright ownership.
'
' This program and the accompanying materials are made available under the
' terms of the Apache License Version 2.0 which is available at
' https://www.apache.org/licenses/LICENSE-2.0
'
' SPDX-License-Identifier: Apache-2.0
' *******************************************************************************

@startuml

class TelemetryBroker

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
should_pass: false
error_contains: |-
[Class] Class "TelemetryBroker" from the unit design not found in the C++ class implementation.
Class : "TelemetryBroker"
Design source file : "validation/core/integration_test/class_design_implementation/negative_class_missing_without_suggestion/class_diagram.puml"
Design source line : 16
Fix : Add implementation class "TelemetryBroker" in the C++ class implementation, or remove it from the unit design.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

class Engine
{
};

class Wheel
{
};

class Dashboard
{
};
Loading
Loading