Skip to content

Conversation

@Elutrixx
Copy link
Contributor

@Elutrixx Elutrixx commented Nov 4, 2025

Goal is to resolve all build warnings in the importer rework branch to enable the 'fail on warning' to be enabled again and would resolve #3865 .

@Elutrixx
Copy link
Contributor Author

Elutrixx commented Nov 4, 2025

I have fixed all of the "obvious" stuff an will try to highlight and @ people here to get feedback on the few remaining things that I am not certain about in an effort to not introduce new bugs. The last person that made the change I am concerned about, which will not always be the correct person to ask, I apologize in advance.

@tpurschke in Report.razor:636 complianceReport.ShowAnyRule Parameter is assigned a value outside of its intended scope which Blazor flags with a warning. I have some rough idea how to fix this after some googling but Id love to either do a seperate pull request with an extensive review of this or a meeting to quick talk and implement these changes

Similarly in DeviceReportController.cs:59 the method ContainsRules() is either intentionally meant to hide DeviceReport.ContainsRules() ... or not. A quick "yes this was intentional" would be enough then I can make it so :)

@abarz722 In ComplianceChecks.razor:106 a new ComplianceCheck is called and its apiConnection set to null, which is not allowed according to the nullable value. I've tried scanning through the related documents to see if making it nullable is an option that can be done quickly and conclude that it does not seem very viable. Is there any way to sensibly change this line to avoid the null assignment?

@abarz722
Copy link
Contributor

abarz722 commented Nov 5, 2025

regarding ComplianceChecks.razor: As the apiConnection seems not to be necessary, maybe the called method (and underlying methods) can be made static. Currently @Robin-Smets is a bit deeper in this sources.

@tpurschke
Copy link
Contributor

Report.razor:636 complianceReport.ShowAnyRule Parameter is assigned a value outside of its intended scope which Blazor flags with a warning. I have some rough idea how to fix this after some googling but Id love to either do a seperate pull request with an extensive review of this or a meeting to quick talk and implement these changes

same answer as from Achim: the compliance report stuff is from Robin, so please reach out to him.

Similarly in DeviceReportController.cs:59 the method ContainsRules() is either intentionally meant to hide DeviceReport.ContainsRules() ... or not. A quick "yes this was intentional" would be enough then I can make it so :)

the Controller class is the attempt to move all the logic to this class, so ContainsRules should eventually only exist in DeviceReportController. Currently both versions are dummy methods always returning true, so they must be implemented (not in your PR). So my suggestion is to remove DeviceReport.ContainsRules() and only work with DeviceReportController.ContainsRules() if possible

@Elutrixx Elutrixx marked this pull request as ready for review November 5, 2025 09:48
@Elutrixx Elutrixx requested a review from Robin-Smets November 5, 2025 12:19
@tpurschke
Copy link
Contributor

@Elutrixx pls. update branch

@tpurschke
Copy link
Contributor

let us leave this PR until next week to make sure we do not interfere with customer upgrades this week

@tpurschke tpurschke requested review from tpurschke and removed request for Robin-Smets November 5, 2025 17:18
@tpurschke tpurschke marked this pull request as draft November 5, 2025 17:18
Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

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

nice - just a view remarks - see inline
let's discuss this on Monday

}

}
(nextPosition, nextParent, lastPosition) = PrepareOrderNumberCreation(currentQueueItem, lastPosition, nextQueueItem);
Copy link
Contributor

Choose a reason for hiding this comment

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

@Robin-Smets can you review this part please? (no hurry, just add to your todo list)

private ReportBase? currentReport;

private FWO.Ui.Shared.TabSet rsbTabset;

Copy link
Contributor

Choose a reason for hiding this comment

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

@Robin-Smets same here for line 636 (see copilot remark regarding test install)

@sonarqubecloud
Copy link

}

//TODO: Does this need to be async?
protected virtual async Task SetComplianceDataForRule(Rule rule, ApiConnection apiConnection, Func<ComplianceViolation, string>? formatter = null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Robin-Smets Is this purposfully left as async? Directing this question at you as you took the awaited method out of the code block, but maybe there is a different reason this needs to be run asynchronously

@Elutrixx
Copy link
Contributor Author

Updated the fixed warnings, apart from open conversations all warnings are fixed (excluding the two warnings that Robin wanted to fix by himself)

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.

3 participants