Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed SonarCloud task void issues related #664

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

nathanatstariongroup
Copy link
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the CDP4-IME code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

  • Task void methods
    • Preserved the asynchronous context where necessary
    • Changed the context to synchronous where possible
  • Fixed other SonarCloud issues on the modified classes
  • Cosmetics changed on the modified classes

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

71.9% 71.9% Coverage
0.0% 0.0% Duplication

@@ -270,7 +290,7 @@ private void Execute(ISession session, UserRuleVerification userRuleVerification
/// <param name="ruleVerification">
/// The <see cref="RuleVerification"/> that is to be updated.
/// </param>
private async void UpdateExecutedOn(ISession session, RuleVerification ruleVerification)
private void UpdateExecutedOn(ISession session, RuleVerification ruleVerification)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably best to make this private async Task ...

/// <summary>
/// The Logger.
/// </summary>
private static Logger logger = LogManager.GetCurrentClassLogger();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to add more logging instead of removing the logger

@@ -262,13 +237,14 @@ private async void ExecuteOk()
var dal = this.dals.Single(x => x.Metadata.DalType == DalType.File);
var dalInstance = (IDal)Activator.CreateInstance(dal.Value.GetType());

var fileExportSession = new Session(dalInstance, creds);
_ = new Session(dalInstance, creds);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not happy about the _ does not make it more readible, please revert

@@ -494,7 +478,7 @@ private async void CreateBinaryRelationship(DiagramConnector connector)
try
{
var operationContainer = containerTransaction.FinalizeTransaction();
await this.Session.Write(operationContainer);
this.Session.Write(operationContainer).GetAwaiter().GetResult();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants