Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rule to enforce strongly typed variables

Open
#2,137 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
powershell
Domain
tooling

Research direction

No files, tests, or entry points are named. Start by reviewing PSScriptAnalyzer's existing rule architecture and the linked type-checking tools, then define the supported type cases, diagnostics, configuration, and tests needed for an optional rule that is disabled by default.

Written by the indexing model from the issue text.

Description

Issue - New Rule Up-for-Grabs

Summary of the new feature

Would be nice is PSSA could add a rule that makes sure variables are strongly typed.

Should be an optional rule, disabled by default, to not break with PowerShell default behavior. But for projects where you want high code quality, readability, and the added safety that explicit types can add, it'd be nice with a lint rule to enforce it.

I'm looking into learning Python, and got inspired by tools like:

Proposed technical implementation details (optional)

  • Error or warn when no type is used, or generic types like [object], [array] and [int].
  • Require explicit data types.

What is the latest version of PSScriptAnalyzer at the point of writing

Dominant language
C#
Stars
2.2k
Forks
415
Avg merge
13h 1m
Merged PRs (30d)
2

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.

More from PowerShell/PSScriptAnalyzer

All issues in PowerShell/PSScriptAnalyzer

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.