Skip to content

Commit

Permalink
Merge pull request #3 from eclipse-ibeji/ashbeitz/suppressDevskimFals…
Browse files Browse the repository at this point in the history
…eAlerts

Suppress Devskim false alerts
  • Loading branch information
ashbeitz authored Nov 29, 2022
2 parents 3cf1952 + af5cfe6 commit 2eadd50
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dtdl-parser/src/model_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ mod model_parser_tests {

let getproperty_value_result = get_property_result.unwrap().get("@value");
assert!(getproperty_value_result.is_some());
assert!(getproperty_value_result.unwrap() == "http://[::1]:40010");
assert!(getproperty_value_result.unwrap() == "http://[::1]:40010"); // Devskim: ignore DS137138

assert!(model.len() == 8);
}
Expand Down
6 changes: 3 additions & 3 deletions provider/src/provider_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ mod provider_impl_tests {

let first_id = String::from("one-id");
let second_id = String::from("two-id");
let first_uri = String::from("http://first.com:9000");
let second_uri = String::from("http://second.com:9000");
let third_uri = String::from("http://third.com:9000");
let first_uri = String::from("http://first.com:9000"); // Devskim: ignore DS137138
let second_uri = String::from("http://second.com:9000"); // Devskim: ignore DS137138
let third_uri = String::from("http://third.com:9000"); // Devskim: ignore DS137138

let first_request =
tonic::Request::new(SubscribeRequest { id: first_id.clone(), uri: first_uri.clone() });
Expand Down
4 changes: 2 additions & 2 deletions samples/simple/consumer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

// Obtain the DTDL for the ambient air temmpterature.
info!("Sending a find_by_id request to the Digital Twin Service for the DTDL for ambient air temperature.");
let mut client = DigitalTwinClient::connect("http://[::1]:50010").await?;
let mut client = DigitalTwinClient::connect("http://[::1]:50010").await?; // Devskim: ignore DS137138
let request = tonic::Request::new(FindByIdRequest {
id: String::from(AMBIENT_AIR_TEMPERATURE_PROPERTY_ID),
});
Expand Down Expand Up @@ -91,7 +91,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = ProviderClient::connect(uri).await?;
let request = tonic::Request::new(SubscribeRequest {
id: String::from(AMBIENT_AIR_TEMPERATURE_PROPERTY_ID),
uri: String::from("http://[::1]:60010"),
uri: String::from("http://[::1]:60010"), // Devskim: ignore DS137138
});
let _response = client.subscribe(request).await?;
info!("Subscribe request completed.");
Expand Down
2 changes: 1 addition & 1 deletion samples/simple/provider/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Server::builder().add_service(ProviderServer::new(provider_impl)).serve(addr);

info!("Registering the Provider's DTDL with the Digital Twin Service.");
let mut client = DigitalTwinClient::connect("http://[::1]:50010").await?;
let mut client = DigitalTwinClient::connect("http://[::1]:50010").await?; // Devskim: ignore DS137138
let request = tonic::Request::new(RegisterRequest { dtdl });
let _response = client.register(request).await?;
info!("The Provider's DTDL has been registered.");
Expand Down

0 comments on commit 2eadd50

Please sign in to comment.