PowerShell / PowerShell/PSScriptAnalyzer

Add a test for copyright headers for CI

Open
#1,155 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Build Issue - Enhancement
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

Found a few files that needed copyright headers for a PR I did with:

Get-ChildItem -Recurse . -Include '*.cs' | ? { $_.Name -notlike '*AssemblyInfo*' } | ? { -not (Select-String -Path $_ -Pattern 'Copyright') }

That worked but still returned some false positives.

Given that there's already documentation tests, we should add a copyright header test too -- but it would require some work, since test assets would need to be moved into directories where they won't be looked for...

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

Locate the existing documentation tests and the test assets they cover, then review how the repository discovers files for CI checks. Use the shown PowerShell search as context for exclusions and false positives. Done means a copyright-header test covers the intended files without requiring unrelated test assets to be scanned.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.