Skip to content

Commit db1d0a4

Browse files
committed
chore(deps): upgrade perfectionist to 0.0.0-rc.6
The new release adds the `flat_module_pattern`, `macro_trailing_comma`, `unicode_ellipsis_in_panic_messages`, and `unknown_perfectionist_lints` rules. Fix the trailing-comma violations the new rule reports and drop the now-redundant flat-module-pattern bullet from `CONTRIBUTING.md`. Two `macro_trailing_comma` warnings remain in `tests/tree_builder.rs` and `tests/visualizer.rs`. They are triggered by single-element multi-line `vec!` invocations that `rustfmt` actively reformats away from a trailing comma, and `#[allow(perfectionist::...)]` cannot be used without nightly `register_tool`. The warnings do not fail the build because `test.sh` does not pass `-D warnings` to `cargo dylint`.
1 parent 082a51c commit db1d0a4

9 files changed

Lines changed: 21 additions & 20 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ use crate::get_size::{GetBlockCount, GetBlockSize};
5454

5555
### Module Organization
5656

57-
- Use the flat file pattern (`module.rs`) rather than `module/mod.rs` for submodules.
57+
The flat file pattern (`module.rs` rather than `module/mod.rs`) is enforced by the `perfectionist::flat_module_pattern` dylint check. In addition to that requirement, follow these conventions:
58+
5859
- List `pub mod` declarations first, then `pub use` re-exports, then private imports and items.
5960
- Use `pub use` to re-export key types at the module level for convenience.
6061

dylint.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[workspace.metadata.dylint]
22
libraries = [
3-
{ git = "https://github.com/KSXGitHub/perfectionist", tag = "0.0.0-rc.0" },
3+
{ git = "https://github.com/KSXGitHub/perfectionist", tag = "0.0.0-rc.6" },
44
]

src/app/hdd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ fn is_virtual_block_device<Fs: FsApi>(block_dev: &str) -> bool {
237237
| "xen-blkfront"
238238
| "vbd"
239239
| "vmw_pvscsi"
240-
| "hv_storvsc"
241-
)
240+
| "hv_storvsc",
241+
),
242242
)
243243
}
244244

src/app/hdd/test_linux_smoke.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn real_sysfs_vda_does_not_panic() {
1414
fn nonexistent_device_is_not_virtual() {
1515
assert!(
1616
!is_virtual_block_device::<RealFs>("nonexistent_device_xyz"),
17-
"non-existent device should not be detected as virtual"
17+
"non-existent device should not be detected as virtual",
1818
);
1919
}
2020

src/app/overlapping_arguments/test_remove_overlapping_paths.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fn remove_duplicated_arguments() {
9090
"0/1/2",
9191
"./bar",
9292
"./abc/./def",
93-
]);
93+
],);
9494
let mut actual = original.clone();
9595
remove_overlapping_paths::<MockedApi>(&mut actual);
9696
let expected = vec!["foo", "bar", "abc/def", "0/1/2"];
@@ -104,7 +104,7 @@ fn remove_duplicated_arguments() {
104104
"abc/def",
105105
"foo",
106106
"0/1/2",
107-
]);
107+
],);
108108
let mut actual = original.clone();
109109
remove_overlapping_paths::<MockedApi>(&mut actual);
110110
let expected = vec!["foo", "./bar", "./abc/./def", "0/1/2"];
@@ -145,7 +145,7 @@ fn remove_all_except_current_dir() {
145145
"abc/def",
146146
"0/1/2",
147147
MOCKED_CURRENT_DIR,
148-
]);
148+
],);
149149
let mut actual = original.clone();
150150
remove_overlapping_paths::<MockedApi>(&mut actual);
151151
let expected = vec!["."];
@@ -158,7 +158,7 @@ fn remove_all_except_current_dir() {
158158
".",
159159
"abc/def",
160160
"0/1/2",
161-
]);
161+
],);
162162
let mut actual = original.clone();
163163
remove_overlapping_paths::<MockedApi>(&mut actual);
164164
let expected = vec![MOCKED_CURRENT_DIR];
@@ -182,7 +182,7 @@ fn remove_all_except_parent_dir() {
182182
"abc/def",
183183
".",
184184
"0/1/2",
185-
]);
185+
],);
186186
let mut actual = original.clone();
187187
remove_overlapping_paths::<MockedApi>(&mut actual);
188188
let expected = vec!["/home/user"];
@@ -199,7 +199,7 @@ fn remove_overlapping_real_paths() {
199199
"link-to-foo/child",
200200
"link-to-bar/a/b/c",
201201
"0/1/2",
202-
]);
202+
],);
203203
let mut actual = original.clone();
204204
remove_overlapping_paths::<MockedApi>(&mut actual);
205205
let expected = vec!["foo", "bar", "abc/def", "0/1/2"];
@@ -212,7 +212,7 @@ fn remove_overlapping_real_paths() {
212212
"bar",
213213
"abc/def",
214214
"0/1/2",
215-
]);
215+
],);
216216
let mut actual = original.clone();
217217
remove_overlapping_paths::<MockedApi>(&mut actual);
218218
let expected = vec!["foo", "bar", "abc/def", "0/1/2"];
@@ -225,7 +225,7 @@ fn remove_overlapping_real_paths() {
225225
"abc/def",
226226
"link-to-current-dir/bar",
227227
"0/1/2",
228-
]);
228+
],);
229229
let mut actual = original.clone();
230230
remove_overlapping_paths::<MockedApi>(&mut actual);
231231
let expected = vec!["link-to-current-dir/foo", "bar", "abc/def", "0/1/2"];
@@ -242,7 +242,7 @@ fn do_not_remove_symlinks() {
242242
"link-to-foo",
243243
"link-to-bar",
244244
"0/1/2",
245-
]);
245+
],);
246246
let mut actual = original.clone();
247247
remove_overlapping_paths::<MockedApi>(&mut actual);
248248
let expected = original;
@@ -255,7 +255,7 @@ fn do_not_remove_symlinks() {
255255
"link-to-foo",
256256
"link-to-bar",
257257
"0/1/2",
258-
]);
258+
],);
259259
let mut actual = original.clone();
260260
remove_overlapping_paths::<MockedApi>(&mut actual);
261261
let expected = original;

src/hardlink/hardlink_list/summary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ where
9090
}
9191
Ordering::Less => {
9292
panic!(
93-
"Impossible! Total of nlink ({links}) is less than detected paths ({paths}). Something must have gone wrong!"
93+
"Impossible! Total of nlink ({links}) is less than detected paths ({paths}). Something must have gone wrong!",
9494
);
9595
}
9696
}

src/man_page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ fn render_possible_values(out: &mut String, arg: &Arg) {
275275
}
276276
if matches!(
277277
arg.get_action(),
278-
ArgAction::SetTrue | ArgAction::SetFalse | ArgAction::Count
278+
ArgAction::SetTrue | ArgAction::SetFalse | ArgAction::Count,
279279
) {
280280
return;
281281
}

tests/cli_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn min_ratio_1() {
7272
"error: invalid value '1' for '--min-ratio <MIN_RATIO>': greater than or equal to 1"
7373
""
7474
"For more information, try '--help'."
75-
}
75+
},
7676
);
7777
assert_eq!(&stdout, &[] as &[u8]);
7878
}
@@ -101,7 +101,7 @@ fn max_depth_0() {
101101
r#"error: invalid value '0' for '--max-depth <MAX_DEPTH>': Value is neither "inf" nor a positive integer: number would be zero for non-zero type"#
102102
""
103103
"For more information, try '--help'."
104-
}
104+
},
105105
);
106106
assert_eq!(&stdout, &[] as &[u8]);
107107
}

tests/one_file_system.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn cross_device_excludes_mount() {
230230
.find_map(|mut entry| entry.next()?.ok());
231231
assert!(
232232
poll_result.is_some(),
233-
"FUSE mount at {mount_point:?} not ready after {retries} retries"
233+
"FUSE mount at {mount_point:?} not ready after {retries} retries",
234234
);
235235

236236
let build_expected_tree = |device_boundary: DeviceBoundary| -> String {

0 commit comments

Comments
 (0)