Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/19/24 in all areas

  1. Elliot Hillary

    DelphiLint v1.0.0 released!

    We're excited to announce the release of DelphiLint v1.0.0, a free and open-source static analyzer and linter for the Delphi IDE! DelphiLint is powered by SonarDelphi, our Delphi analyzer for the SonarQube code quality platform that scans entire codebases with more than 120 different rules. With DelphiLint, the feedback loop is shortened - it allows you to analyze individual files within your editor and correct problems before they're even checked in. GitHub: https://github.com/integrated-application-development/delphilint Release: https://github.com/integrated-application-development/delphilint/releases/tag/v1.0.0 Features Analyze one or more files on demand View detected issues, descriptions, and rationale inline in the Delphi IDE Two analysis modes: Standalone - run analyses entirely locally with a default set of active rules Connected - connect to a SonarQube instance, allowing for Fetching of active rules and configuration from the server's configured quality profiles Suppression of issues that have been resolved in past analyses Usage of the server's version of SonarDelphi Uses the same rules and configuration files as SonarDelphi, making configuration easy for projects that already use SonarDelphi for code quality DelphiLint supports RAD Studio for Delphi 11+. Feedback and contributions are welcome!
  2. Stefan Glienke

    Variable not initialized?

    https://docwiki.embarcadero.com/Libraries/Athens/en/System.SysUtils.TStringHelper.TrimLeft
  3. Fellow Delphi developers, This is with great pleasure that we announce the immediate availability of HelpNDoc 9.1, an easy to use yet powerful help authoring tool producing CHM help files, responsive HTML 5 and mobile Websites, DocX and PDF manuals, Markdown documents, ePub and Kindle eBooks as well as Qt Help files from a single source. HelpNDoc is Free for personal use and evaluation purposes and is available at: https://www.helpndoc.com HelpNDoc 9.1 provides many new features and enhancements such as a new dynamic content library item which enables real-time HTML and Pascal script integration within topics, improved duplication of build actions, and much more... You can learn more about this update at: https://www.helpndoc.com/news-and-articles/2024-03-19-introducing-groundbreaking-dynamic-content-capabilities-in-the-helpndoc-help-authoring-tool-version-9.1/ Video of some of the new features in HelpNDoc 9.1: Download HelpNDoc now and use it for free for personal and evaluation purposes: https://www.helpndoc.com/download Follow our step-by-step video guides to learn how to use HelpNDoc: Best regards, John, HelpNDoc team. https://www.helpndoc.com
  4. Stefan Glienke

    DelphiLint v1.0.0 released!

    Is it still not possible to create self-contained executables with Java? If so it would be nice because that would remove the requirement for the JRE.
  5. Stano

    Variable not initialized?

    If the condition "if s<>#48 then" is never satisfied, then j is not initialized. immediately after begin, initialize the variable. I use inline var for this.
  6. Anders Melander

    x87 vs SSE single truncation

    By the way, the reason why the RTL Trunc is slower is probably because it's only been implemented for Double; There is no overload for Single so it always incurs the overhead of Single->Double conversion. The x64 version is implemented with a single CVTTSD2SI instruction while the x86 version uses x87. Also, since the RTL Trunc is implemented as assembler it cannot be inlined and on x86 Delphi always pass Single params on the stack even though they would fit in a general register. This levels the playing field and makes a faster alternative worthwhile. It's beyond me why they haven't implemented basic numerical functions such as Trunc, Round, Abs, etc. as compiler intrinsics so we at least can get them inlined.
  7. Elliot Hillary

    DelphiLint v1.0.0 released!

    Thanks for trying it out - glad it went smoothly for you! Currently you cannot customise the list of rules used in standalone mode. In connected mode, you can configure the rules to use on SonarQube - the relevant section of the SonarDelphi manual is here. 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. There's also currently no way of "clearing" issues from a file after an analysis. Of course, if you fix the issues and re-analyze the file, they will disappear, but if this is something you'd like to see as well then please let us know. We're tracking feature requests and bugs using GitHub Issues - please raise an issue for any features you'd like to see (and of course, for any bugs you encounter)! Contributions are also welcome :)
  8. Elliot Hillary

    DelphiLint v1.0.0 released!

    That's correct - you don't need to have anything SonarQube-related to use DelphiLint in standalone mode. After installing into the IDE, it's ready to go. If you decide you would like to set up SonarQube and use DelphiLint in connected mode, it's worth mentioning that SonarQube Community Edition is free, open-source, self-hosted, and does not require any sort of license - with the SonarDelphi plugin it's a great (and free) option for managing Delphi code quality.
  9. gkobler

    wuppdi Welcome Page for Delphi 11 Alexandria?

    New version 1.0.5.B25 are available. At the moment just for D12
  10. I suggest to open a support ticket for Registration & Installation via https://www.embarcadero.com/support
  11. ANN: New version of StyleControls VCL v 5.75 with Skia VCL interaction for Lottie Animations just released. https://www.almdev.com In new version we added TscGPGlyphContainerButton control, which uses any TControl as Glyph inside. Also we created special demo for RAD Studio Athens with Skia VCL controls and TscGPGlyphContainerButton (TskAnimationImage with Lottie animations and TskSvg control - really new level of UI in your applications)...
  12. Dave Nottage

    Java type JExoPlayer_Builder could not be found

    Which version of Delphi are you using, and which target? i.e. Android 32-bit, or Android 64-bit? If you're using Delphi 11.3 and are compiling for Android 64-bit, please see this link.
  13. Lars Fosdal

    Variable not initialized?

    Frequent scenario function Test: integer; var i: integer; begin try i := 1; // do something finally; Result := i; end; end; i needs to be initialized before the try block.
  14. Hi all, I've always missed a modern implementation of a syntax highlighting in RAD Studio. So when I saw a github repo containing pascal grammar for Tree-sitter, I started working on an IDE extension that makes use of it. Since there are no Delphi bindings for Tree-sitter I wrote a simple TCP Server in Rust, which receives the currently opened source code, parses it and generates the highlight information. After this information is sent back to the IDE I use it to draw more informative highlighting. Simple example below. I'm not sure about the performance, since it sends the code, parses and sends back the entire ToolsApi.pas file with 83k lines in 421 milliseconds. But it doesn't need to reparse the entire file on changes so it should be able to provide real-time highlighting, although I haven't implemented that yet. Now the grammar isn't finished and I haven't really looked into how to write grammar files, plus I really don't know enough about the Pascal and Delphi language to undertake something like that. The Point of this post is to gauge if there is even any interest for an extension like this.
  15. Glenn Dufke

    IDE Syntax Highlighter using Tree-sitter

    I've already made a full binding of the APIs. It isn't published yet, as it is part of my formatter and syntax highlighter product I'm building for Delphi (and C++Builder) The current editor highlighter toolsapi interface is limited. To get the full benefits of the syntax highlighting data tree-sitter can deliver, complete takeover of the editor painting is necessary. The grammar for the pascal parser needs an update indeed.
  16. dummzeuch

    Delphi 12 error when closing the ide

    I know that GExperts can cause this. Unfortunately I so far was unable to find the actual problem. It seems to be connected with using the formatter very frequently.
  17. Der schöne Günther

    Embed line number at design time??

    It sounds like you are trying to add an exception logging mechanism to your application. Would you like some help? All jokes aside, if that's the case, then you should really investigate proper stack tracing and exception logging mechanisms. In case (for whatever reason), you really just like to add the current line number into a string, then have a look at: https://stackoverflow.com/q/7214213
  18. DelphiUdIT

    Delphi 12 error when closing the ide

    Most often this happens if you use third-party components. Try uninstalling add-ons (such as those installed by GETIT) one at a time to find which one might be generating the AV (assuming it depends on the added components).
  19. Dalija Prasnikar

    Getters & Settters??

    Getters and Setters are methods called when you get (read) or set (write) property. In Delphi you don't need to have getter and setter methods. Properties can be directly connected to a field. You use getters or setters when you want to run additional code besides directly reading or writing some field value. Following is basic property declaration without any getters or setters. When you access property, compiler just directly reads or writes from associated field. TFoo = class protected FValue: Integer; published property Value: Integer read FValue write FValue; end; Following is property declaration with setter method (you can have any combination you need and you don't need to declare both methods if you just need one of them) TFoo = class protected FValue: Integer; procedure SetValue(AValue: Integer); published property Value: Integer read FValue write SetValue; end; Because getters and setters are methods, they will be a bit slower than directly using a field. If your setter is just setting a field and does nothing more, then you don't really need it. Same goes for getter. If it just returns the field then it is not needed. procedure TFoo.SetValue(AValue: Integer); begin FValue := AValue; end; If for instance you don't want to allow setting Value to zero, you might have following code in a setter. procedure TFoo.SetValue(AValue: Integer); begin if AValue <> 0 then FValue := AValue; end; You can even raise an exception if you set property to invalid value or similar. The only time when you would need to use getters and setters that just read or write to a field, is when your property needs to be accessible through interface. Interfaces require that getters and setters are methods.
  20. Bill Meyer

    IDE Syntax Highlighter using Tree-sitter

    I have not yet looked into the project, but there is this: https://github.com/rickard67/LSP-Pascal-Library and this: https://github.com/rickard67/language-server-protocol They were written, it seems, in support of a text editor by the same developer. He provides an unusually large amount of info with snippets demonstrating calls. Seems very helpful, but it also makes me think the task is challenging, even with what he has already written.
×