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

Warn on lowercase method name during script analyze #5483

Merged

Conversation

FabienTschanz
Copy link
Contributor

@FabienTschanz FabienTschanz commented Nov 28, 2024

Pull Request (PR) description

@ykuijs This PR starts to warn developers and maintainers of DSC resources inside Microsoft365DSC if a lowercase method name is used instead of the correct PascalCase version. Method names in C# are per-design in PascalCase, but because PowerShell is case insensitive, those method names can be written in lower case as well. The new rule UseCorrectMethodCasing warns if an invalid method name is detected and suggests a fix for it.

This Pull Request (PR) fixes the following issues

None.

Task list

  • Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
    Entry should say what was changed and how that affects users (if applicable), and
    reference the issue being resolved (if applicable).
  • Resource parameter descriptions added/updated in the schema.mof.
  • Resource documentation added/updated in README.md.
  • Resource settings.json file contains all required permissions.
  • Examples appropriately added/updated.
  • Unit tests added/updated.
  • New/changed code adheres to DSC Community Style Guidelines.

Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

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

LGTM

@ykuijs ykuijs merged commit 6fca37b into microsoft:Dev Nov 29, 2024
2 checks passed
@FabienTschanz FabienTschanz deleted the feat/code-formatting-method-names branch November 29, 2024 07:32
@ykuijs
Copy link
Member

ykuijs commented Nov 29, 2024

Excellent work! Thanks for submitting!

@FabienTschanz
Copy link
Contributor Author

Always a pleasure, handy little work finding out how the AST parser works 😄 If there is something more you would like to have, just let me know.

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