Commit Graph

99 Commits

Author SHA1 Message Date
Charlie Marsh cd69610741
Use `--config` everywhere if provided (#1210) 2022-12-12 10:28:00 -05:00
Charlie Marsh a3d06d0005
Move more commands into commands.rs (#1209) 2022-12-12 10:22:47 -05:00
Charlie Marsh ac6fa1dc88
Simplify some logic around configuration detection (#1197) 2022-12-12 10:15:05 -05:00
Charlie Marsh 73794fc299
Resolve hierarchical settings and Python files in a single filesystem pass (#1205) 2022-12-12 10:13:52 -05:00
Charlie Marsh 0adc9ed259
Support hierarchical settings for nested directories (#1190) 2022-12-12 10:12:23 -05:00
Charlie Marsh 8fa414b67e
Move configuration-CLI resolution into dedicated methods (#1188) 2022-12-10 19:07:38 -05:00
Charlie Marsh 74668915b0
Remove serialization format from Settings struct (#1183) 2022-12-10 13:38:59 -05:00
Charlie Marsh 3152dd7a8e
Don't prompt users to --fix if they ran with --fix (#1133) 2022-12-07 19:07:51 -05:00
Charlie Marsh 971bf6d232 Run cargo fmt 2022-12-05 23:01:47 -05:00
Charlie Marsh 0acc47386a
Use pyproject.toml parent as project root when explicitly provided (#1101) 2022-12-05 23:00:59 -05:00
messense fb2c457a9b
Upgrade to notify 5.0.0 (#1048) 2022-12-05 09:58:42 -05:00
Charlie Marsh 46f5053c73
Include fixes in JSON API output (#988) 2022-12-01 16:30:56 -05:00
Edgar R. M 9e1ba916f0
Send logs to stderr (#977) 2022-12-01 10:19:32 -05:00
Charlie Marsh ced7868559
Add format setting to pyproject.toml (#964) 2022-11-29 19:22:23 -05:00
Anders Kaseorg 041d8108e6
Don’t require files with --explain or --generate-shell-completion (#937) 2022-11-28 00:40:20 -05:00
messense 23b4e16b1d
Add shell completions support (#935) 2022-11-27 23:59:36 -05:00
Charlie Marsh 04b9c0a31d Fix cargo clippy 2022-11-24 23:40:43 -05:00
Charlie Marsh 92ca114882
Move some main.rs subcommands to a new module (#901) 2022-11-24 22:43:43 -05:00
Charlie Marsh 553bc7443a
Remove UserConfiguration struct (#900) 2022-11-24 22:39:07 -05:00
CelebrateVC a3af6c1ea5
Implement GlobSet optimization for file path exclusions (#883) 2022-11-24 22:31:55 -05:00
Harutaka Kawamura 19ad6ab4f5
Add `--explain` (#887) 2022-11-23 00:06:25 -05:00
Charlie Marsh 7316b120ba
Log errors in add_noqa and autoformat calls (#881) 2022-11-22 19:21:36 -05:00
Charlie Marsh bdd32c0850
Enforce most pedantic lints on CI (#878) 2022-11-22 18:55:57 -05:00
Charlie Marsh b922e6ecc8
Fix clippy::unnecessary_wraps (pedantic) (#880)
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
2022-11-22 18:25:30 -05:00
Charlie Marsh fe77fb70a1
Apply autofixes iteratively until code is stabilized (#875) 2022-11-22 16:37:52 -05:00
Anders Kaseorg 9a66cf2ffb Fix clippy::uninlined_format_args (pedantic)
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-11-21 23:22:28 -05:00
Anders Kaseorg 9dc788d089 Fix clippy::let_underscore_drop (pedantic)
https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-11-21 23:22:28 -05:00
Anders Kaseorg 8d9d9b3204 Fix clippy::documentation_markdown (pedantic)
https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-11-21 23:22:28 -05:00
Anders Kaseorg 7a61edbe46
Fix clippy::default-trait-access (pedantic) (#867) 2022-11-21 21:00:38 -05:00
Anders Kaseorg b657d912d9
Propagate errors from glob::Pattern::new (#858) 2022-11-21 13:39:19 -05:00
Charlie Marsh 9f9a545c51
Improve cache performance by removing `cacache` dependency (#833) 2022-11-20 13:36:33 -05:00
Charlie Marsh 5bf8219db3
Make main.rs robust to cache initialization failures (#831) 2022-11-20 11:05:17 -05:00
Charlie Marsh 0f34cdb7a3
Enable customization of autofixable error codes (#811) 2022-11-18 18:49:13 -05:00
Charlie Marsh 437b6f23b9
Remove warn_on checks (#812) 2022-11-18 18:48:24 -05:00
Harutaka Kawamura e81efa5a3d
Implement a `--show-source` setting (#698) 2022-11-18 14:02:29 -05:00
Edgar R. M f44fada446
Implement C901 (mccabe) (#765) 2022-11-17 17:40:50 -05:00
Charlie Marsh 7d8360a1de
Change all &Option<> to Option<&> (#768) 2022-11-16 09:40:01 -05:00
Charlie Marsh 1fe90ef7f4
Only notify once for each app update (#762) 2022-11-15 16:14:10 -05:00
Charlie Marsh b5cb9485f6 Move updater to its own module 2022-11-15 15:51:24 -05:00
Charlie Marsh 4d798512b1
Only print version checks on tty (#761) 2022-11-15 15:36:06 -05:00
Charlie Marsh 0d3fac1bf9
Add --line-length command line argument (#759) 2022-11-15 12:23:38 -05:00
Charlie Marsh 07c9fc55f6
Add fix option to `pyproject.toml` (#639) 2022-11-07 09:46:21 -05:00
Charlie Marsh 1b33cfb9cb
Respect project root in per-file ignores (#631) 2022-11-06 21:15:49 -05:00
Charlie Marsh 242bdf86b1 Use ::ruff to ensure ruff imports come first 2022-11-03 10:09:28 -04:00
Charlie Marsh a3f7de2257
Make --quiet more aggressive (#566) 2022-11-03 10:08:15 -04:00
Charlie Marsh 79ca66ace5
Use nightly rustfmt with rustfmt.toml (#536) 2022-11-01 20:34:38 -04:00
Charlie Marsh 5797884262
Represent per-file ignores as a map (#531) 2022-10-31 22:15:33 -04:00
Charlie Marsh c495cef529
Move pyproject.toml logging to debug (#506) 2022-10-29 17:07:46 -04:00
Charlie Marsh 7df903dc4d
Move around and rename some of the Settings structs (#496) 2022-10-28 18:46:54 -04:00
Anders Kaseorg 650b025181
Suppress “No pyproject.toml found” message with --quiet (#478) 2022-10-26 16:03:25 -04:00