Jump to content

Joshua Gardner

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

10 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Joshua Gardner

    pasfmt out now!

    <deleted duplicate post>
  2. Joshua Gardner

    pasfmt out now!

    A good question! At this point in time, we strive to not modify any tokens, for safety. We have tentative plans to implement keyword lowercasing in the future. For identifiers, we feel strongly that the identifier should match its declaration, however, this tool doesn't have any semantic information to be able to enforce this. Our other tools sonar-delphi in conjunction with delphilint are much better suited to that task.
  3. Joshua Gardner

    pasfmt out now!

    It is a fair enough question. In the context of a code formatter, it means that it has a strong opinion on what the code should look like. Predominantly, this manifests in having few or no configuration options and a highly consistent style. Other formatters like prettier, biome, and google-java-format call themselves opinionated.
  4. Joshua Gardner

    pasfmt out now!

    We're excited to share the first public release of pasfmt, a free and open-source code formatter for Delphi. It is a complete and opinionated formatting tool. The latest release has support for: Complete line wrapping (and unwrapping) for all Delphi structures Configurable line length limit Removing trailing whitespace Change spacing around all tokens (e.g., operators and keywords) Parallel file formatting with directory traversal Removing repeated empty newlines Line ending normalisation To get started, either try our web demo, or download the executable (this one for Windows) and follow the getting started guide. Additionally, there is an IDE plugin with support for: In-editor formatting Format-on-save Cursor tracking You may be wondering how this tool compares to the existing formatters (e.g., GExperts, JEDI, Formatter.exe). This tool goes a lot further than the alternatives by having a complete opinion on how every line should be wrapped or unwrapped; the original layout is (almost) ignored. By ignoring most of the input format, it produces consistently styled code across a whole codebase. We hope that you enjoy pasfmt, let us know what you think!
×