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

贡献者指南