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

prevent 'error IDE0036: Modifiers are not ordered' #710

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

jburnett
Copy link
Contributor

@jburnett jburnett commented Aug 21, 2024

Using build ci at githash 5b4aa54 gives 'error IDE0036: Modifiers are not ordered'

/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/ControlPropertiesCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj] /Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/CustomPropertiesCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj] /Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/CustomPropertyParametersCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj] /Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Extensions/YamlExtensions.cs(11,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj] /Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/PaYaml/Models/NamedObjectMapping.cs(16,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj] /Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/PaYaml/Models/NamedObjectSequence.cs(12,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
0 Warning(s)
6 Error(s)

If this is related to an issue open in GitHub, please link it to this ticket and put the URL here.

Problem

Cloning the repo and following its instructions to build using build ci results in a failed build. The error code indicates an error in the expected order for modifiers.

Solution

Either fix the modifier order of the files identified, or take my change to ignore them.

Changes

  • I changed .editorconfig to ignore IDE0036 errors. AFAIK, modifier order does not impact the resulting assembly.

Validation

  • Successfully built PA tools w/this small change.

Using `build ci` at githash 5b4aa54 gives 'error IDE0036: Modifiers are not ordered'

/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/ControlPropertiesCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/CustomPropertiesCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Collections/CustomPropertyParametersCollection.cs(10,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Extensions/YamlExtensions.cs(11,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/PaYaml/Models/NamedObjectMapping.cs(16,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/PaYaml/Models/NamedObjectSequence.cs(12,5): error IDE0036: Modifiers are not ordered (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0036) [/Users/jb/src/github.com/microsoft/PowerApps-Tooling/src/Persistence/Microsoft.PowerPlatform.PowerApps.Persistence.csproj]
    0 Warning(s)
    6 Error(s)
@jburnett jburnett requested a review from a team as a code owner August 21, 2024 19:00
Copy link
Member

@tehcrashxor tehcrashxor left a comment

Choose a reason for hiding this comment

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

Looks like the style diagnostic is complaining about occurrences of readonly static which should be static readonly. A better fix would be updating those instances instead of turning off the diagnostic.

@jburnett jburnett requested a review from a team as a code owner August 23, 2024 20:03
@jburnett
Copy link
Contributor Author

@microsoft-github-policy-service agree

@jburnett
Copy link
Contributor Author

I resubmitted with changes to field decorator order as suggested.

@joem-msft joem-msft merged commit 2e59eee into microsoft:master Aug 28, 2024
4 checks passed
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