PowerShell / PowerShell/PSScriptAnalyzer

CorrectionExtent should also contain StartOffset/EndOffset

Open
#723 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It'd be helpful if CorrectionExtents had Start/EndOffsets so that edits can easily be applied to file contents without having to calculate line/column position from an array containing the file contents. This would make it easier for us to apply those corrections to file contents in a built-in PSSA command.

/cc @Jaykul

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

The issue names CorrectionExtent but no file or test entry point. Locate the CorrectionExtent definition and its existing tests, then determine how StartOffset and EndOffset should accompany the current line and column data. Done means corrections expose offsets that can be used to apply edits without recalculating positions from file contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.