diff --git a/client/DelphiLintClientProjects250.groupproj b/client/DelphiLintClientProjects250.groupproj
new file mode 100644
index 00000000..57c1ebe1
--- /dev/null
+++ b/client/DelphiLintClientProjects250.groupproj
@@ -0,0 +1,48 @@
+
+
+ {E13F5E64-5BEF-4919-9E81-0DFCBA69E1B4}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/source/DelphiLint.Analyzer.pas b/client/source/DelphiLint.Analyzer.pas
index 2c94d3fc..e2361302 100644
--- a/client/source/DelphiLint.Analyzer.pas
+++ b/client/source/DelphiLint.Analyzer.pas
@@ -158,7 +158,7 @@ procedure TAnalyzerImpl.AnalyzeFiles(const Files: TArray; const ProjectF
end
else if not LintContext.Settings.StandaloneUseDefaultRules then begin
AnalyzeOptions.UseDefaultRules := False;
- AnalyzeOptions.DisabledRules := SplitString(LintContext.Settings.StandaloneDisabledRules, ',');
+ AnalyzeOptions.DisabledRules := TArray(SplitString(LintContext.Settings.StandaloneDisabledRules, ','));
end;
DoAnalyzeFiles(AnalyzeOptions, ProjectOptions.SonarHostDownloadPlugin);
diff --git a/client/source/DelphiLint.FileLogger.pas b/client/source/DelphiLint.FileLogger.pas
index 54c443c9..26b4f512 100644
--- a/client/source/DelphiLint.FileLogger.pas
+++ b/client/source/DelphiLint.FileLogger.pas
@@ -66,7 +66,7 @@ constructor TFileLogger.Create(LogPath: string);
FLock := TMutex.Create;
if not TFile.Exists(FLogPath) then begin
- FreeAndNil(TFile.Create(FLogPath));
+ TFile.Create(FLogPath).Free;
end;
end;
diff --git a/client/source/DelphiLint.Handlers.pas b/client/source/DelphiLint.Handlers.pas
index 510df847..b70fcbac 100644
--- a/client/source/DelphiLint.Handlers.pas
+++ b/client/source/DelphiLint.Handlers.pas
@@ -319,7 +319,7 @@ destructor TEditorHandler.Destroy;
// Although these hooks are owned by the context menu, we need to free them when the plugin is disabled
for Hook in FPopupHooks.Values do begin
Hook.OnFreed.RemoveListener(OnHookFreed);
- FreeAndNil(Hook);
+ Hook.Free;
end;
FreeAndNil(FPopupHooks);
diff --git a/client/source/DelphiLint.HtmlGen.pas b/client/source/DelphiLint.HtmlGen.pas
index cf82caef..a3aa87bb 100644
--- a/client/source/DelphiLint.HtmlGen.pas
+++ b/client/source/DelphiLint.HtmlGen.pas
@@ -354,6 +354,59 @@ function TRuleHtmlGenerator.GenerateRuleDescriptionHtml(Description: TRuleDescri
//______________________________________________________________________________________________________________________
function TRuleHtmlGenerator.BuildHtmlPage(BodyHtml: string; BodyClass: string): string;
+
+ function GetLegacyScript: string;
+ begin
+ Result :=
+ 'function hasClass(element, className) {' +
+ ' return element.className && element.className.indexOf(className) !== -1;' +
+ '}' +
+ 'function addClass(element, className) {' +
+ ' if (!hasClass(element, className)) { element.className += " " + className }' +
+ '}' +
+ 'function removeClass(element, className) {' +
+ ' if (!hasClass(element, className)) { return }' +
+ ' element.className = element.className.replace(" " + className, "").replace(className, "");' +
+ '}' +
+ 'function getElementsWithClass(className) {' +
+ ' var elements = [];' +
+ ' var allElements = document.getElementsByTagName("*");' +
+ ' for (var i = 0; i < allElements.length; i++) {' +
+ ' if (hasClass(allElements[i], className)) { elements.push(allElements[i]) }' +
+ ' }' +
+ ' return elements;' +
+ '}' +
+ 'function highlightTag(tagName) {' +
+ ' var preElements = document.getElementsByTagName(tagName);' +
+ ' for (var i = 0; i < preElements.length; i++) {' +
+ ' var pre = preElements[i];' +
+ ' if (pre.getAttribute("data-diff-type")) {' +
+ ' addClass(pre, "hljs");' +
+ ' }' +
+ ' }' +
+ '};' +
+ 'function registerTabs() {' +
+ ' var tabBtns = getElementsWithClass("tab-btn");' +
+ ' for (var i = 0; i < tabBtns.length; i++) {' +
+ ' tabBtns[i].onclick = function () {' +
+ ' var activeButtons = getElementsWithClass("tab-btn active");' +
+ ' var activeContents = getElementsWithClass("tab-content active");' +
+ ' for (var j = 0; j < activeButtons.length ; j++) { removeClass(activeButtons[j], "active") }' +
+ ' for (var k = 0; k < activeContents.length; k++) { removeClass(activeContents[k], "active") }' +
+ ' addClass(this, "active");' +
+ ' var targetId = this.getAttribute("data-content-id");' +
+ ' var targetContent = document.getElementById(targetId);' +
+ ' if (targetContent) { addClass(targetContent, "active") }' +
+ ' };' +
+ ' }' +
+ '};' +
+ 'function initLegacy() {' +
+ ' highlightTag("pre");' +
+ ' registerTabs();' +
+ '};' +
+ 'setTimeout(initLegacy, 100);';
+ end;
+
begin
Result := Format(
'' +
@@ -364,7 +417,15 @@ function TRuleHtmlGenerator.BuildHtmlPage(BodyHtml: string; BodyClass: string):
'' +
'' +
' %s
' +
- ' ' +
+ ' ' +
'' +
'