Skip to content

feat(fmt): rewrite formatter using Solar and a structured algorithm #10350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
98fc4a2
init
DaniPopes Apr 9, 2025
4fe995e
wip
DaniPopes Apr 14, 2025
8face95
wip
DaniPopes Apr 14, 2025
4e7abc1
add dbg from prettyplease
DaniPopes Apr 14, 2025
350332a
wip
DaniPopes Apr 15, 2025
4b54bf9
fixes, pragma&imports
DaniPopes Apr 15, 2025
7ed556b
feat: using, types, literals
DaniPopes Apr 16, 2025
b99ee19
feat: contract
DaniPopes Apr 16, 2025
5e21a4c
rm duplicate testdata
DaniPopes Apr 16, 2025
8dc7b98
wip: finish items; exprs, stmts
DaniPopes Apr 16, 2025
a6e1930
wips
DaniPopes Apr 17, 2025
c4706a8
feat: line_length, tab_width
DaniPopes Apr 17, 2025
fb15641
feat: contract_new_lines
DaniPopes Apr 17, 2025
e03b056
wip: single_line_statement_blocks
DaniPopes Apr 17, 2025
edcc467
tweaks
DaniPopes Apr 18, 2025
2878e87
chore: bump solar to latest main
DaniPopes Apr 19, 2025
ffe3b65
fix: test dir
DaniPopes Apr 19, 2025
b55e0e7
Merge branch 'master' into dani/fmt-solar
DaniPopes Apr 22, 2025
9762203
bump
DaniPopes Apr 22, 2025
ff3b76b
fix docs
DaniPopes Apr 22, 2025
e4e069e
fix: adjust '()' for modifier calls
DaniPopes Apr 22, 2025
3e0ece8
test: typed yul does not exist anymore
DaniPopes Apr 22, 2025
872da09
test: function parameters cannot be empty
DaniPopes Apr 22, 2025
b38a820
fix: adjust '()' for modifier calls for real
DaniPopes Apr 22, 2025
2f7400b
fix: forge fmt hates '*' imports
DaniPopes Apr 22, 2025
967b026
test: fix some invalid syntax
DaniPopes Apr 22, 2025
100f8e0
test: disable-stop does not exist
DaniPopes Apr 22, 2025
6c53373
test: fix all parse errors
DaniPopes Apr 22, 2025
da745a7
fix: literal touchups
DaniPopes Apr 23, 2025
22741de
bump
DaniPopes Apr 23, 2025
357d6ab
Merge branch 'master' into dani/fmt-solar
DaniPopes Apr 28, 2025
7b8b919
test: add snapshotting
DaniPopes Apr 28, 2025
19a5402
test: update NumberLiteralUnderscore
DaniPopes Apr 28, 2025
3558807
fixes
DaniPopes Apr 28, 2025
6b45260
struct space
DaniPopes Apr 28, 2025
1858c04
test: fix StructDefinition; empty structs are not allowed anyway
DaniPopes Apr 28, 2025
79bc94c
test: update EventDefinition; matches Solidity style guide
DaniPopes Apr 28, 2025
d00bc3f
test: update EnumDefinition; same as StructDefinition
DaniPopes Apr 28, 2025
2979b00
test: update StructDefinition 2
DaniPopes Apr 28, 2025
4f287e7
fix: comments in structs/enums
DaniPopes Apr 28, 2025
dc47584
test: update ErrorDefinition; matches Solidity style guide
DaniPopes Apr 28, 2025
cf5e826
feat: print docs with other comments; update EnumVariants
DaniPopes Apr 28, 2025
91b608a
chore: update EnumDefinition, StructDefinition
DaniPopes Apr 28, 2025
15bbbf2
chore: readd post_break
DaniPopes Apr 28, 2025
d331896
chore: rename is_hardbreak_tok
DaniPopes Apr 28, 2025
ccf4da9
Merge branch 'master' into dani/fmt-solar
DaniPopes Apr 30, 2025
2ed2a07
feat: cleanups, more impls
DaniPopes Apr 30, 2025
8b350b9
test: fix some compile errors
DaniPopes Apr 30, 2025
7009742
feat: add FormatterResult with more variants
DaniPopes May 1, 2025
ecef2bd
stuff
DaniPopes May 2, 2025
1788a63
refactor: move print_item arms into their own functions
DaniPopes May 2, 2025
4a5ff36
chore: consolidate item hardbreaks
DaniPopes May 2, 2025
adba140
Merge branch 'master' into dani/fmt-solar
DaniPopes May 5, 2025
b9f2cbe
fix: inline config parsing for block comments
DaniPopes May 5, 2025
bc4093c
wip: rm FunctionLike, wip functions
DaniPopes May 5, 2025
d6ff628
fix: clamp margin to max as well
DaniPopes May 5, 2025
1a827c5
megawip
DaniPopes May 8, 2025
1b2a400
feat: most of yul
DaniPopes May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_STORE
/target*
/*.sol
out/
snapshots/
out.json
Expand Down
Loading