.editorconfig formatting option to start new lines with commas + space rather than ending lines with comma

Đang mở
#171 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
sql
Lĩnh vực
databases, tooling

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra cách các tùy chọn .editorconfig được biểu diễn và formatter xử lý các mệnh đề SELECT, danh sách IN và các định nghĩa đối tượng như thế nào. Công việc hoàn tất khi một thiết lập opt-in tạo ra các dấu phẩy ở đầu dòng kèm theo một khoảng trắng cho các danh sách đó, đồng thời giữ nguyên hành vi hiện có đối với các đối số hàm.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

formatting

I was redirected here to create this issue from: https://github.com/madskristensen/SqlFormatter/issues/24

Original request

Is your feature request related to a problem? Please describe.
My team standardizes on commas being placed at the beginning of a line rather than at the end of the line. This would be for lists specfically, not necessarily function arguments. For example: the SELECT clause primarily, but also includes IN lists, object definitions (parameter lists, column lists, etc.)) This formatter doesn't appear to support this code standard. I'd love for our team to use a formatter to follow our code standards such as this one.

Describe the solution you'd like
I would like an opt-in option for the .editorconfig to allow for this format:

SELECT 
    u.Id
    , u.Name
    , u.Email
FROM Users u

I think the formatter also places the first column on the same line as the SELECT and uses AS for aliasing, but that's a compromise my team can live with.

Describe alternatives you've considered
It seems like we would have to build our own Visual Studio extension?

Additional context
This online formatter provides this option. https://www.dpriver.com/pp/sqlformat.htm

Image
Ngôn ngữ chính
GAP
Star
277
Fork
43
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/SqlScriptDOM

Tất cả issue của microsoft/SqlScriptDOM

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.