From 6012c08f65422b3357585ca4c1a615740ae0f6f9 Mon Sep 17 00:00:00 2001 From: dcrosby Date: Wed, 21 Jan 2026 14:25:07 -0800 Subject: [PATCH] [chef-utils] Add .editorconfig, remove vim modelines Summary: Copy editorconfig settings from between-meals and add patterns for extensionless scripts. Remove vim modelines from 4 files as the editorconfig now handles indentation settings. Test Plan: Verified editorconfig file created correctly and vim modelines removed. Reviewers: Tags: --- .editorconfig | 16 ++++++++++++++++ chef-server-stats/chef-server-stats | 2 -- chefctl/src/chefctl.rb | 2 -- chefctl/src/spec/chefctl_spec.rb | 2 -- scripts/run_rubocop | 2 -- 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..59ae4ec --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# https://editorconfig.org +root = true +[{*.rb,Gemfile,*.gemspec,Steepfile}] +indent_style = space +indent_size = 2 +tab_width = 2 + +[scripts/run_rubocop] +indent_style = space +indent_size = 2 +tab_width = 2 + +[chef-server-stats/chef-server-stats] +indent_style = space +indent_size = 2 +tab_width = 2 diff --git a/chef-server-stats/chef-server-stats b/chef-server-stats/chef-server-stats index b1c6c91..211f21e 100755 --- a/chef-server-stats/chef-server-stats +++ b/chef-server-stats/chef-server-stats @@ -1,7 +1,5 @@ #!/opt/chef/bin/knife exec -# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 -# # Author:: KC Braunschweig () # Copyright:: Copyright (c) 2013-present Facebook # License:: Apache License, Version 2.0 diff --git a/chefctl/src/chefctl.rb b/chefctl/src/chefctl.rb index 5edf0fe..4a1f8b9 100755 --- a/chefctl/src/chefctl.rb +++ b/chefctl/src/chefctl.rb @@ -1,7 +1,5 @@ #!/opt/chef/embedded/bin/ruby -# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 - # Copyright 2013-present Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/chefctl/src/spec/chefctl_spec.rb b/chefctl/src/spec/chefctl_spec.rb index 0707d87..020116c 100644 --- a/chefctl/src/spec/chefctl_spec.rb +++ b/chefctl/src/spec/chefctl_spec.rb @@ -1,5 +1,3 @@ -# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 -# # Copyright 2024-present Meta Platforms, Inc. and affiliates # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/scripts/run_rubocop b/scripts/run_rubocop index 97ebae7..0ffdce1 100755 --- a/scripts/run_rubocop +++ b/scripts/run_rubocop @@ -1,7 +1,5 @@ #!/bin/bash # -# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 -# # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. #