integrated-application-development / delphilint

Delphi IDE package providing on-the-fly code analysis and linting, powered by SonarDelphi
GNU Lesser General Public License v3.0
80 stars 9 forks source link

Display rich rule description diffs #2

Closed fourls closed 8 months ago

fourls commented 10 months ago

Prerequisites

Engine area

Delphi IDE integration

Improvement description

The SonarDelphi rule descriptions make use of a special diff view syntax. SonarQube recognises these and runs a diffing algorithm to render them with full highlighting:

image

DelphiLint does not have a diffing algorithm implementation and so only displays these in a very rudimentary way:

image

DelphiLint should display these diffs in the same rich manner that SonarDelphi does.

Rationale

The current approach would bring DelphiLint in line with SonarQube for rule descriptions, and would greatly improve readability of these code snippets.

fourls commented 8 months ago

SonarQube's diffing logic is implemented in code-difference.ts in SonarSource/sonarqube. It defers the actual diffing algorithm to jsdiff, which is incompatible with the embedded IE browser.

This indicates that if we want diffing, we'll have to do it ourselves.

fourls commented 8 months ago

Fixed in 77e9e4c219b19b1f9d8a41d7c09ad51f650b28ac