Jump to content

JonRobertson

Members
  • Content Count

    289
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by JonRobertson

  1. JonRobertson

    Do you need an ARM64 compiler for Windows?

    I still have problems using the "integrated" (sort of) debugger with Win64 projects.
  2. It does not. I just installed R43 in Delphi 11.3.
  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.
  4. JonRobertson

    DelphiLint v1.0.0 released!

    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
  5. JonRobertson

    DelphiLint v1.0.0 released!

    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. 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.
  6. JonRobertson

    DelphiLint v1.0.0 released!

    https://github.com/integrated-application-development/sonar-delphi/issues/211
  7. JonRobertson

    DelphiLint v1.0.0 released!

    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.
  8. 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. EditInVsCodeDelphiPlugin
  9. JonRobertson

    Editor: name of this vertical line

    The editor right margin. It is configurable: Tools->Options->User Interface->Editor->Display, in "Margin in gutter" section, "Right margin"
  10. JonRobertson

    Taskbar Icon Menu.

    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/
  11. 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?
  12. Yes you do, as long as you have the source code. You have complete control over when a DM is created.
  13. JonRobertson

    DelphiLint v1.0.0 released!

    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.
  14. JonRobertson

    DelphiLint v1.0.0 released!

    Done. Issue 207
  15. JonRobertson

    DelphiLint v1.0.0 released!

    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.
  16. JonRobertson

    Minimal working Example for libgit2-delphi

    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. 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
  17. JonRobertson

    DelphiLint v1.0.0 released!

    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.
  18. JonRobertson

    DelphiLint v1.0.0 released!

    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.
  19. JonRobertson

    Hunting a unit reference

    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.
  20. JonRobertson

    Code Review for Delphi and Pascal

    Apparently is possibly accurate. Supposedly is more accurate, at least that was the case six months ago. My rant on DerScanner
  21. JonRobertson

    What new features would you like to see in Delphi 13?

    And has not been possible since Delphi 1.
  22. JonRobertson

    What new features would you like to see in Delphi 13?

    Yes, unless you have the C++ source and wanted to create a C++ DLL that could be used from Delphi using a COM interface. http://rvelthuis.de/articles/articles-cppobjs.html
  23. JonRobertson

    TFrame versus SubForm

    Thanks for letting me know. I do not have much experience with the various DPI issues.
  24. JonRobertson

    What new features would you like to see in Delphi 13?

    How was it possible with Delphi 1?
  25. JonRobertson

    TFrame versus SubForm

    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.
×