forcedotcom / forcedotcom/code-analyzer

[Feature Request] Option to match block highlight/decoration functionality of Apex PMD

Open
#1,838 3 comments 9 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
240
Forks
52
Avg merge
1d 23h
Merged PRs (30d)
5

Description

### Product Area

The "Salesforce Code Analyzer" VS Code Extension

### Your Need or Problem

Since switching over to using the Salesforce Code Analyzer extension exclusively rather than using Apex PMD, I've noticed a difference in behavior with how lines are highlighted for notice/warning/errors.

The Salesforce Code Analyzer extension is highlighting the entire block for certain violations that apply to the whole block, this includes an entire class, or an entire method.

Apex PMD previously used to only highlight the start line where the violation occurred. In my opinion, this is less intrusive, making it easier to read and see where errors / warnings are happening.

Here's an example:

(Salesforce Code Analyzer Extension)
Image

(Apex PMD Extension)
Image

In these examples you can see that it's much easier to see other warnings within the block using the Apex PMD extension. I'm requesting an option in the extension to match this Apex PMD behavior.

### Your Desired Solution

My desired solution would be to add an option to set the decoration ranges as the start line only, rather than the entire block from start line to end line.

### Alternatives Considered

_No response_

### Additional Context (Screenshots, Files, etc)

_No response_

### Workaround

_No response_

### Urgency

Low

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.