From 29d992615d7a81dcbf00743ac0295cc0b898a1a7 Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Thu, 17 Oct 2019 21:49:15 +0200 Subject: [PATCH] Adapt tooling settings --- .rubocop.yml | 19 +++++++++++++++++++ .rustfmt.toml | 9 +++++++++ 01_wait_forever/.rustfmt.toml | 4 ---- 01_wait_forever/.vscode/settings.json | 9 +++++++-- 02_runtime_init/.rustfmt.toml | 4 ---- 02_runtime_init/.vscode/settings.json | 9 +++++++-- 03_hacky_hello_world/.rustfmt.toml | 4 ---- 03_hacky_hello_world/.vscode/settings.json | 9 +++++++-- 04_zero_overhead_abstraction/.rustfmt.toml | 4 ---- .../.vscode/settings.json | 9 +++++++-- 05_safe_globals/.rustfmt.toml | 4 ---- 05_safe_globals/.vscode/settings.json | 9 +++++++-- 06_drivers_gpio_uart/.rustfmt.toml | 4 ---- 06_drivers_gpio_uart/.vscode/settings.json | 9 +++++++-- 07_uart_chainloader/.rustfmt.toml | 4 ---- 07_uart_chainloader/.vscode/settings.json | 9 +++++++-- utils/helpers/.rubocop.yml | 2 -- 17 files changed, 77 insertions(+), 44 deletions(-) create mode 100644 .rubocop.yml create mode 100644 .rustfmt.toml delete mode 100644 01_wait_forever/.rustfmt.toml delete mode 100644 02_runtime_init/.rustfmt.toml delete mode 100644 03_hacky_hello_world/.rustfmt.toml delete mode 100644 04_zero_overhead_abstraction/.rustfmt.toml delete mode 100644 05_safe_globals/.rustfmt.toml delete mode 100644 06_drivers_gpio_uart/.rustfmt.toml delete mode 100644 07_uart_chainloader/.rustfmt.toml delete mode 100644 utils/helpers/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..f154b675 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,19 @@ +# The behavior of RuboCop can be controlled via the .rubocop.yml +# configuration file. It makes it possible to enable/disable +# certain cops (checks) and to alter their behavior if they accept +# any parameters. The file can be placed either in your home +# directory or in some project directory. +# +# RuboCop will start looking for the configuration file in the directory +# where the inspected file is and continue its way up to the root directory. +# +# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md + +Layout/IndentationWidth: + Width: 4 + +Metrics/LineLength: + Max: 100 + +Metrics/MethodLength: + Max: 20 diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 00000000..25a74537 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,9 @@ +newline_style = "Unix" +edition = "2018" +merge_imports = true +format_code_in_doc_comments = true +normalize_comments = true +wrap_comments = true +comment_width = 100 +report_fixme = "Always" +report_todo = "Always" diff --git a/01_wait_forever/.rustfmt.toml b/01_wait_forever/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/01_wait_forever/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/01_wait_forever/.vscode/settings.json b/01_wait_forever/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/01_wait_forever/.vscode/settings.json +++ b/01_wait_forever/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/02_runtime_init/.rustfmt.toml b/02_runtime_init/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/02_runtime_init/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/02_runtime_init/.vscode/settings.json b/02_runtime_init/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/02_runtime_init/.vscode/settings.json +++ b/02_runtime_init/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/03_hacky_hello_world/.rustfmt.toml b/03_hacky_hello_world/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/03_hacky_hello_world/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/03_hacky_hello_world/.vscode/settings.json b/03_hacky_hello_world/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/03_hacky_hello_world/.vscode/settings.json +++ b/03_hacky_hello_world/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/04_zero_overhead_abstraction/.rustfmt.toml b/04_zero_overhead_abstraction/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/04_zero_overhead_abstraction/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/04_zero_overhead_abstraction/.vscode/settings.json b/04_zero_overhead_abstraction/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/04_zero_overhead_abstraction/.vscode/settings.json +++ b/04_zero_overhead_abstraction/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/05_safe_globals/.rustfmt.toml b/05_safe_globals/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/05_safe_globals/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/05_safe_globals/.vscode/settings.json b/05_safe_globals/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/05_safe_globals/.vscode/settings.json +++ b/05_safe_globals/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/06_drivers_gpio_uart/.rustfmt.toml b/06_drivers_gpio_uart/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/06_drivers_gpio_uart/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/06_drivers_gpio_uart/.vscode/settings.json b/06_drivers_gpio_uart/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/06_drivers_gpio_uart/.vscode/settings.json +++ b/06_drivers_gpio_uart/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/07_uart_chainloader/.rustfmt.toml b/07_uart_chainloader/.rustfmt.toml deleted file mode 100644 index 4c96ef12..00000000 --- a/07_uart_chainloader/.rustfmt.toml +++ /dev/null @@ -1,4 +0,0 @@ -newline_style = "Unix" -edition = "2018" -format_code_in_doc_comments = true -merge_imports = true diff --git a/07_uart_chainloader/.vscode/settings.json b/07_uart_chainloader/.vscode/settings.json index 058f9200..f2fa6961 100644 --- a/07_uart_chainloader/.vscode/settings.json +++ b/07_uart_chainloader/.vscode/settings.json @@ -1,5 +1,10 @@ { "editor.formatOnSave": true, - "rust.features": ["bsp_rpi3"], + "rust.features": [ + "bsp_rpi3" + ], "rust.all_targets": false, -} + "editor.rulers": [ + 100 + ], +} \ No newline at end of file diff --git a/utils/helpers/.rubocop.yml b/utils/helpers/.rubocop.yml deleted file mode 100644 index 2bc3e976..00000000 --- a/utils/helpers/.rubocop.yml +++ /dev/null @@ -1,2 +0,0 @@ -Style/WordArray: - Enabled: false