From 73617ab050b646f099ba7ccb74cbecf94329a67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an?= Date: Tue, 27 Aug 2024 19:44:27 +0200 Subject: [PATCH] Update rubocop command (#316) `--auto-correct` got deprecated in https://github.com/rubocop/rubocop/commit/aabdf0acf5ed729daf20506475d5629bfffb1890 --------- Signed-off-by: Dusan --- CHANGELOG.md | 6 ++++++ apheleia-formatters.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 213d04f..fe8443d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog]. +## Unreleased +### Formatters +* [`rubocop`](https://github.com/rubocop/rubocop) changed to use `-a` instead of deprecated `--auto-correct` ([#316]). + +[#316]: https://github.com/radian-software/apheleia/pull/316 + ## 4.2 (released 2024-08-03) ### Changes * Custom Emacs Lisp formatting functions have the option to report an diff --git a/apheleia-formatters.el b/apheleia-formatters.el index 6257e09..dfab5f8 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -158,7 +158,7 @@ (python3-json . ("python3" "-m" "json.tool" (apheleia-formatters-indent "--tab" "--indent"))) - (rubocop . ("rubocop" "--stdin" filepath "--auto-correct" + (rubocop . ("rubocop" "--stdin" filepath "-a" "--stderr" "--format" "quiet" "--fail-level" "fatal")) (ruby-standard . ("standardrb" "--stdin" filepath "--fix" "--stderr" "--format" "quiet" "--fail-level" "fatal"))