

Zane
Members-
Content Count
8 -
Joined
-
Last visited
Everything posted by Zane
-
This is the style that pasfmt uses. It's most consistent to break after every visibility specifier because it does start a new section, and there may not be a visibility specifier before the next section: type TClass = class(TObject) private const SomeConstant = 5; type SomeType = integer; end;
-
There is configuration for the formatting style, but it is intentionally limited. The lack of (extensive) configuration is in line with the first goal of the project: Anyone who wants a formatter that can properly wrap and unwrap long lines in a style that makes sense, while supporting all modern Delphi features. As far as we know, there are no other Delphi formatters that come close in this regard. This was covered quite extensively in the last thread, and in this issue.
-
The logic for the tracking of locations is implemented in the formatter itself. It's accessed via the `--cursor` CLI option, and the implementation is in this file. As for the plugin, you probably already found it, but the code that interfaces with the IDE to effect the relocations is here (and GExperts was a good reference for implementing this).
-
You are right that the plugin calls the executable. I've addressed this comment over on the repository where an issue was raised. https://github.com/integrated-application-development/pasfmt/issues/159#issuecomment-2672690523
-
The handling for multiline strings and multiline comments is pretty minimal at the moment. It knows how to parse them and therefore can avoid mangling them (unlike some other Delphi formatters). In a future release we would like to have the formatter rewrite the inside of multiline strings and comments such that they can be indented/deindented, and (in the case of comments) re-flowed.
-
It's just downloading the `sonar-delphi-plugin-<version>.jar` file from the SonarDelphi releases page. To get around your issue with the automatic download you can manually download the latest released `.jar` from that page and place it inside `%APPDATA%\DelphiLint\plugins`.
-
If you can provide a minimal reproducible example of this, we'd love to have an issue raised on SonarDelphi for it.
-
Elliot answered a similar question earlier: