konveyor / enhancements

Enhancements tracking repository for Konveyor
Apache License 2.0
3 stars 35 forks source link

[RFE] Rules to consider for .Net modernization #169

Open johnbuckley opened 6 months ago

johnbuckley commented 6 months ago

Attaching a spreadsheet of suggested rules DotNetRules.xlsx

konveyor-ci-bot[bot] commented 6 months ago

This issue is currently awaiting triage. If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance. The triage/accepted label can be added by org members.

rromannissen commented 6 months ago

@djzager @dymurray @pranavgaikwad for your consideration.

djzager commented 2 months ago

@johnbuckley First, thank you very much for sharing this resource.

Spending some time looking at turning this into a consumable ruleset for Konveyor, I wonder if you could speak to the relationship between "Target Type", "Target member", "Header for assembly name entries". The sheet with these columns seems to me the most obvious candidate for making into a ruleset. However, devising a scheme that makes sense for each row has been difficult.

As an example, take a row like this:

T:System.Windows.ResourceDictionary T:System.Windows.ResourceDictionary Microsoft.Xrm.Tooling.CrmConnectControl Not supported

Should the rule look like...

- message: |
    Use appropriate type of files for migration from your Windows Forms-based desktop app from .NET Framework to .NET Core 3.0 or later.
  description: |
    Use appropriate type of files for migration from your Windows Forms-based desktop app from .NET Framework to .NET Core 3.0 or later.
  ruleID: dotnet-ruleset-0001
  when:
    - dotnet.referenced:
        pattern: "CrmConnectControl"
        namespace: "Microsoft.Xrm.Tooling"

Or...

- message: |
    Use appropriate type of files for migration from your Windows Forms-based desktop app from .NET Framework to .NET Core 3.0 or later.
  description: |
    Use appropriate type of files for migration from your Windows Forms-based desktop app from .NET Framework to .NET Core 3.0 or later.
  ruleID: dotnet-ruleset-0001
  when:
    - dotnet.referenced:
        pattern: "ResourceDictionary"
        namespace: "System.Windows"

Neither is unique, that is both System.Windows.ResourceDictionary and Microsoft.Xrm.Tooling.CrmConnectControl are referenced multiple times (some rows are missing the Header for assembly name entries).

tl;dr I'm struggling to construct an algorithm that translates the sheet into a ruleset that properly communicates, "I see this in your application source. That is a problem because . You could mitigate this by doing < x , y, or z >"