dsccommunity / dsccommunity/ActiveDirectoryDsc

ActiveDirectoryDsc: Using splatting when calling cmdlets where line exceeds 120 characters

Open
#415 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted
Dominant language
PowerShell
Stars
388
Forks
141
PR merge metrics
No merged PRs in 30d

Description

There are places in the code that make calls to cmdlets and use a long list of parameters.

Example:
https://github.com/PowerShell/xActiveDirectory/blob/07c878522df6015f5a74692e931ddeeeb5d9decf/DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1#L28

We should use splatting at these locations throughout the repo to make the code easier to read. See style guideline https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-parameter-usage-in-function-and-cmdlet-calls

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DSCResources/MSFT_xADOrganizationalUnit/MSFT_xADOrganizationalUnit.psm1 at the linked call and review the referenced DscResources StyleGuidelines.md section on parameter usage. Search the repository for cmdlet calls exceeding 120 characters and convert the applicable calls to splatting; done means the relevant long calls follow the guideline and remain functionally equivalent.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.