integrated-application-development / integrated-application-development/pasfmt
Format inside of directives
- Dominant language
- Rust
- Stars
- 105
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
A suggestion from #193 was to remove trailing spaces in conditional directives.
I think this is a good idea, and could be extended to a more general rule for formatting directives.
They can get pretty complicated so we should be careful in implementing this, but there are at least some simple cases that would be nice to cover.
For example
1. `{$ifdef NAME}`
* normalise casing of the directive (unclear whether lower or upper case is preferable)
* completed in #281
* one space between identifier and directive
* no trailing space
2. `{$COMPILERDIRECTIVE}`
* no spaces after directive
3. `{$if DEFINED(Foo) and (CONSTANT > 3)}`
* a real stretch goal would be to format the `{$if}` directive expressions like a regular Delphi expression
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.