google / google/xls

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

Open
#1,883 0 comments 0 reactions 0 assignees View on GitHub
dslx dslx:fmt enhancement
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.