

JonRobertson
-
Content Count
289 -
Joined
-
Last visited
-
Days Won
7
Posts posted by JonRobertson
-
-
5 minutes ago, dummzeuch said:the delete button should have cleared the line. If it doesn't, that's indeed a bug.
It does not. I just installed R43 in Delphi 11.3.
-
Downloaded and installed. This is very helpful, even without adding custom visualizers.
I looked on sf for a way to add an "issue" and checked the blog. I suppose you want all feedback to be on this post.
In Tools Options, after clicking "Add Defaults", I then deleted each of the items that were added. Except the Delete button does nothing when there is a single item in the list.
-
1
-
-
For anyone that has DelphiLint installed, I just filed ticket Issue 20 because BDS.exe was racing one logical CPU when the IDE was otherwise idle and no projects were loaded. Once I removed the Delphi Lint package, BDS.exe CPU usage dropped to 0%.
Delphi 11.3 (28.0.48361.3236)
DelphiLintClient-1.0.1-Alexandria.bpl
delphilint-server-1.0.1.jar
plugins\DEFAULT-sonar-delphi-1.3.0.jar
-
7 minutes ago, Elliot Hillary said:It could be. I followed the instructions and was in a console window when starting the service. I don't remember anything written to the console window that would have indicated the problem was related to that issue.
Now that DelphiLint standalone is working, next week I may installing SonarQube again and try to get a "connected" configuration working. I still need to install our certificate in the JVM and verify that DelphiLint is able to download SonarDelphi.
13 minutes ago, Elliot Hillary said:By default, DelphiLint and SonarDelphi follow Delphi's Object Pascal Style Guide, so this is where the naming convention rules get their standard opinions from.
My opinion is that naming convention is not a risk factor, which is the benefit of static analysis. Perhaps there is a risk that I am not aware of. I could see the benefit of those rules being available, just turned off by default. Another example is the default name of a "break" in a menu (main menu or popup menu). The default is "N1" for the first break, "N2" for the second, etc. Sonar suggests that I give those menu items a more meaningful name. As an experienced Delphi developer, naming it "miBreak1" is no more meaningful than "N1", because I know what they are and I don't need to reference them in code.
-
On 3/19/2024 at 4:50 PM, Zane said:If you can provide a minimal reproducible example of this, we'd love to have an issue raised on SonarDelphi for it.
https://github.com/integrated-application-development/sonar-delphi/issues/211
-
1
-
-
On 3/19/2024 at 5:07 AM, Elliot Hillary said:If there's a lot of interest in customising the rules in standalone mode, that's certainly something that could make its way into a future release.
I definitely would appreciate customizing rules in standalone mode. I attempted installing SonarQube and going the "connected mode" route. However, I had difficulty getting the SonarQube service started and I am not a Java guy.
Some of the rules are more annoying than helpful. I have no idea what "naming conventions" DelphiLint is expecting. One convention seems to be that unit names must be PascalCase. Particularly for legacy projects, there is no benefit. Yes, a consistent naming convention is very helpful. Does anyone care that all of our form units follow formMain.pas rather than FormMain.pas?
I almost want to create an issue for the rule "split this 128 characters long line (which is greater than 120 authorized)". Authorized by who, or what? Certainly not by me, my employer, or anything that I've configured in Delphi.
Others are personal preferences. "Delphi style guides" may advise against using () when calling a routine without arguments. But I prefer to have them. They do no harm and I think they improve code read-ability.
Those are just a couple examples where the ability to customize the rules, even in standalone mode, would be appreciated.
-
1
-
-
I've never heard of the Delphi IDE "using" an external editor. The integration between the editor and the rest of the IDE (designer, object inspector, tool palette, etc) would likely need a heavy refactor or rewrite. But as @Lars Fosdal mentioned, you can edit Pascal source in any text editor. The project below is a Delphi plug-in that adds a command to the Tools menu to open the current unit in Visual Code. With a little configuration, you could switch between Delphi and Visual Code at will, taking advantage of features in Visual Code such as Copilot.
-
2
-
-
The editor right margin. It is configurable:
Tools->Options->User Interface->Editor->Display, in "Margin in gutter" section, "Right margin"
-
1
-
-
Search for JumpList.TJumpList. Here are a few links to get you started.
https://docwiki.embarcadero.com/RADStudio/Athens/en/VCL_Taskbars
https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.JumpList.TCustomJumpList.AddTask
https://blog.marcocantu.com/blog/2014-september-vcl-xe7-taskbar-jumplist.html
https://perevoznyk.wordpress.com/2011/05/25/adding-windows-7-jump-list-to-a-delphi-2010-application/
-
2
-
-
A project that I inherited has warning "W1047 Unsafe code" enabled. I normally do not enable that warning. There is a scenario that I don't understand, even after some online searches.
[dcc32 Warning] W1047 Unsafe code 'String index to var param'
From a couple posts that I read, it seems this specific unsafe warning is related to multiple platform support and zero based strings.
It occurs in this (totally useless) code segment:
function Test(const aStr: String): String; begin SetLength(Result, Length(aStr)); var Count := 0; for var i := 1 to Length(aStr) do begin Inc(Count); Result[Count] := aStr[i]; end; end;
on Result[Count] := aStr;
The wording of the warning confuses me. There is an index to a string, but not what I consider a 'string index'. Does the [] operator for String receive the index as a var param?
-
On 1/27/2022 at 8:09 AM, Fr0sT.Brutal said:You don't have full and flexible control over when a DM is created
Yes you do, as long as you have the source code. You have complete control over when a DM is created.
-
1 hour ago, VoSs2o0o said:I cannot use this Tool: When i press "analyze" i get the error
I suggest creating an Issue here. And there is no reason for an option to be added. The plug-in should determine the correct paths and Delphi version without needing you to configure it.
-
1 hour ago, Elliot Hillary said:Please raise an issue, including your JDK/JRE distribution and version, and we'll see what we can do
Done. Issue 207
-
9 minutes ago, Elliot Hillary said:if you choose to manually download the jar and place it in %APPDATA%\DelphiLint\plugins, it should be named "DEFAULT-sonar-delphi-plugin-1.3.0.jar"
Thanks for the extra info. Downloaded and renamed. The first unit that I tried to analyze gave this error:
DelphiLint encountered a problem during analysis. An error was raised (java.lang.OutOfMemoryError: Java heap space ).
That unit has 464 lines of code. The entire project has 12,533 lines of code, not counting Delphi RTL, VCL, and third-party components. So this isn't a large project by any means.
This laptop has 32GB of physical memory and 13.5 GB was available at the time of the analysis.
-
On 3/16/2024 at 3:58 PM, aegger said:repoPP : PPgit_repository;
Your original declaration declared a pointer, but never assigned it to anything. Since it is a local variable on the stack, it contained a garbage/random value rather than a pointer to actual data.
On 3/16/2024 at 9:02 PM, Darian Miller said:"repoPP:PGit_repository" and call "git_repository_init(@repoPP..."
Darian's suggestion changed your declaration to an instance of data. Using @repoPP then passed the memory address (pointer) of the data to the DLL. See The @ Operator
-
50 minutes ago, JonRobertson said:I am about to download SonarDelphi manually
I am curious what the "standalone" version would download from GitHub. Following the link to install SonarDelphi, you need to install SonarQube, then SonarScanner, then install the SonarDelphi plug-in in SonarQube.
I installed SonarQube and configured a database via the install instructions. But the SonarQube service refuses to start.
-
I installed it but I was not able to use it.
The first issue is that the BPL is not signed and our corporate policy would not allow Delphi to load the BPL. I worked around the issue by signing the BPL with our code signing certificate.
The next issue is that DelphiLint is unable to download SonarDelphi from GitHub. A better error message would be appreciated. The dialog simply says to check my internet connection, which is definitely working at the moment.
I am about to download SonarDelphi manually. Hopefully the documentation will have instructions on configuring DelphiLint so it "knows" that SonarDelphi is installed.
-
4 hours ago, Clément said:If I [...] rename the unit the project doesn't compile.
That is why I would rename the unit. When the project fails to compile, the error should occur in the unit that is "using" the unwanted unit. Note that it often requires a Build rather than just a Compile to locate the unit containing the reference.
-
1 hour ago, Darian Miller said:Apparently they have a Code Analysis security tool with support for Delphi.
Apparently is possibly accurate. Supposedly is more accurate, at least that was the case six months ago.
-
1 minute ago, David Heffernan said:But there's no way that there's going to be a Delphi produced which can consume C++ libraries compiled by some arbitrary C++ compiler.
And has not been possible since Delphi 1.
-
6 minutes ago, shineworld said:So, to use a 3rd part DLL made with C++, eg: MSVC or C++Builder itself, it is necessary to create a Proxy C DLL with C++ Builder.
https://blogs.embarcadero.com/how-to-use-a-c-dll-in-any-delphi-program/Yes, unless you have the C++ source and wanted to create a C++ DLL that could be used from Delphi using a COM interface.
-
16 minutes ago, Uwe Raabe said:Using the same TVirtualImageList for several forms will fail if these forms are placed on monitors with different DPI
Thanks for letting me know. I do not have much experience with the various DPI issues.
-
7 hours ago, shineworld said:Delphi13 will be useful to import DLL made with C++
6 hours ago, David Heffernan said:This can already be done, and has been possible since Delphi 1
5 minutes ago, David Heffernan said:OpenCV is written in C++. For which there is no single binary interface.
How was it possible with Delphi 1?
-
6 hours ago, Der schöne Günther said:The IDE supports placing frames at design time. While that enables sharing or referencing components like ImageLists
Not sharing components, or sharing a single instance of a component. If a frame contains an ImageList and is used on multiple forms, each form creates a separate instance of the frame and all components on the frame. So you have multiple copies of the same ImageList, but those forms are not "sharing" the ImageList.
I use a TDataModule for resources and components, such as TImageCollection and TVirtualImageList, that are used by multiple forms.
Do you need an ARM64 compiler for Windows?
in Cross-platform
Posted
I still have problems using the "integrated" (sort of) debugger with Win64 projects.