rust-lang/rustfmt

Increase emphasis/visibility of version-specific nature on Config documentation

已關閉

#4,664 建立於 2021年1月22日

 (4 則留言) (0 個反應) (0 位負責人)Rust (760 個分叉)batch import
A-configE-help-wantedgood first issue

倉庫指標

星標
 (4,893 顆星)
PR 合併指標
 (平均合併 67天) (30 天內合併 5 個 PR)

描述

rustfmt is a highly configurable formatter that supports various configuration options that allow users to override the default formatting rules (e.g. tabs instead of spaces). The set of supported configuration options, and their associated variants/stability/etc., is tightly associated to the corresponding rustfmt version.

For example, if a new configuration option foo_bar is added during the rustfmt v1.4.30 release, foo_bar is available in version v1.4.30, but foo_bar is of course not available in earlier versions of rustfmt (rustfmt v1.4.10 has no idea what foo_bar is).

As such, it's really important that when a user is browsing the rustfmt config documentation that they are looking at the version of the config docs that maps to the version of rustfmt they are actually using. Accordingly, the config documentation website has a dropdown field that allows users to select their corresponding version of rustfmt:

image

Unfortunately though, many users are unaware of the need to use the correct version and end up running into issues when they try to use a newer config option that isn't available in the rustfmt version they are actually using. We've tried a couple things to address this, such as adding this section to the file in source control which does appear a bit lower on the site for some versions, but we need to do more to make this obvious on the config site.

I'm open to any changes to the config site that makes it more visual and obvious, and helps users avoid these issues

貢獻者指南