redhat-developer / redhat-developer/vscode-java

Empty formatter settings disable rules

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

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

formatter
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

I have the google style eclipse settings activated in my user settings.
By accident, I've saved an empty string in my formatter settings of my workspace which lead to

"java.format.settings.url": ""

in my workspace settings.json. I did this in the UI so I didn't notice at first.
Apparently this overwrites the user settings.json file, formatting was done by the default formatting rules and not the ones specified in my user settings.json.

I'm not sure if this is intended or if it's actually related to how vscode (and not this plugin) handle settings values.

Environment
  • Operating System: macOS Catalina 10.15.1
  • JDK version: 1.8.0_202
  • Visual Studio Code version: 1.41.1
  • Java extension version: 0.55.1
Steps To Reproduce
  1. Set custom formatting rules in your user settings.json
"java.format.settings.url": "/PATH/TO/CUSTOM/RULES"
  1. Set custom formatting rules in a project's settings.json to empty string:
"java.format.settings.url": ""
Current Result

Empty-string 'java.format.settings.url' in workspace lead to usage of default rules of the plugin and not the settings url set in the user settings.json.

Expected Result

Empty-string should be a value that is ignored and therefore use the url defined in the user settings.json

Additional Informations

The only way to notice that there is an empty string in the workspace settings.json in the UI is the message that it is 'Modified in: Workspace' but the UI itself shows the same value as it would when it wasn't defined in the first place (empty string).

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.

Hướng nghiên cứu

Bắt đầu bằng cách truy vết cách extension đọc và áp dụng cấu hình java.format.settings.url khi giá trị workspace là một chuỗi rỗng. Xác nhận liệu giá trị workspace rỗng có thể fallback về giá trị người dùng hay không, và kiểm tra hành vi theo các bước tái hiện; issue không xác định file mã nguồn hoặc test nào.

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

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.