Skip to content
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

[enhancement] dslx_fmt let module-level attributes come after license banner #1883

Open
cdleary opened this issue Jan 24, 2025 · 0 comments
Open
Labels
dslx:fmt DSLX auto-formatter dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request

Comments

@cdleary
Copy link
Collaborator

cdleary commented Jan 24, 2025

What's hard to do? (limit 100 words)

Right now it seems like dslx_fmt always places a module attribute like #![feature(use_syntax)] at the very top of the file above a module level comment -- in all other files the header comment is at the top, so seems like it could be good to have the #! underneath the license header comment. In the past I've written hacky scripts that check for the license header "at the very start or after a shebang line", not sure if other things in the universe assume it'd be at the start.

Current best alternative workaround (limit 100 words)

Put the attribute above the license header comment block when you have autoformatting on.

Your view of the "best case XLS enhancement" (limit 100 words)

Module-level attributes could auto-format after a top of file comment block like a license header.

@cdleary cdleary added dslx:fmt DSLX auto-formatter enhancement New feature or request labels Jan 24, 2025
@dplassgit dplassgit added the dslx DSLX (domain specific language) implementation / front-end label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx:fmt DSLX auto-formatter dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants