Skip to content

Rename Copy.Item.Tests.ps1 to match naming convention - #10701

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
romero126:CopyItem.Tests
Jun 12, 2020
Merged

Rename Copy.Item.Tests.ps1 to match naming convention#10701
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:masterfrom
romero126:CopyItem.Tests

Conversation

@romero126

Copy link
Copy Markdown
Contributor

PR Summary

Rename Copy.Item.Tests.ps1 -> Copy-Item.Tests.ps1
in order to match naming convention inside \test\powershell\Modules\Microsoft.PowerShell.Management

PR Context

All filenames in \test\powershell\Modules\Microsoft.PowerShell.Management use Verb-Command.Tests when naming their files. This one however does not match that standard.

PR Checklist

@iSazonov

Ilya (iSazonov) commented Oct 7, 2019

Copy link
Copy Markdown
Collaborator

We have many files not matching naming convention.
If we want have a consistency we must fix everything or fix nothing.

@romero126

Copy link
Copy Markdown
Contributor Author

I agree completely. However we cant just fix everything all at once.. That's why we need the approach fix it when you see it. :)

@vexx32

Copy link
Copy Markdown
Collaborator

Mm true. I could see fixing the naming on each file in a given folder, doing it one folder at a time, perhaps?

@iSazonov

Copy link
Copy Markdown
Collaborator

I don't see a value from the change because we use modern IDEs with power and fast search, c# plugins allows us to follow by references, also sometimes we have many classes in one file - as result file name lost value but in the same time renaming complicates commit history.

@daxian-dbw

Copy link
Copy Markdown
Member

... in the same time renaming complicates commit history.

I kinda agree with Ilya (@iSazonov) on that. Renaming a file will cause the file history to be "lost" (or to be more accurate, harder to retrieve). So if it's not necessary, maybe we should avoid renaming files.

@vexx32

Copy link
Copy Markdown
Collaborator

Is it so frequent that we need to dig up file history?

The additional time needed to dig up file history is usually not immense, and not needed very often. I would be surprised if that's necessary anywhere near as much as folx need to go looking for the file. Time lost finding the file as it is now v.s. time lost finding the file as it was before the rename weighted depending on frequency of need.

I would argue that having a consistent naming convention will make maintenance easier both for the PS team and folx in the community, especially folx just starting to look at contributing. In my opinion the consistency is valuable here, but y'all may have different ideas. 🙂

@iSazonov

Copy link
Copy Markdown
Collaborator

Is it so frequent that we need to dig up file history?

If you want to get better understanding how a code works you will look history frequently.

@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Mainainer, Please provide feedback and/or mark it as Waiting on Author

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Conflicts resolved.
romero126 Sorry that this PR has been overlooked for so long ...
The general guideline is to avoid renaming files to keep the history handy. But in this particular case, the history is not very interesting. So I decide to take this change.

@daxian-dbw

Copy link
Copy Markdown
Member

The change in this PR has nothing to do with the CI failure, so I will force merge it.

@ghost ghost removed the Review - Needed The PR is being reviewed label Jun 12, 2020
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 8d85c14 into PowerShell:master Jun 12, 2020
@iSazonov Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Jun 12, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.4 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants