Skip to content

Commit

Permalink
chore(development): add vim modelines to bin/* (#10183)
Browse files Browse the repository at this point in the history
This adds vim modelines to our lua scripts in bin/ to identify their
filetypes and set the proper indentation settings.

I wish this could be done without cluttering up files with comment
strings, but .editorconfig does not have any notion of "treat this file
as $filetype." I have updated .editorconfig with the proper settings for
these files, however.
  • Loading branch information
flrgh authored Mar 6, 2023
1 parent 9286052 commit d6cd28f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@ indent_size = 4

[Makefile]
indent_style = tab

[bin/kong]
indent_style = space
indent_size = 2

[bin/busted]
indent_style = space
indent_size = 2

[bin/kong-health]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions bin/busted
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ require("kong.globalpatches")({

-- Busted command-line runner
require 'busted.runner'({ standalone = false })

-- vim: set ft=lua ts=2 sw=2 sts=2 et :
2 changes: 2 additions & 0 deletions bin/kong
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ pcall(require, "luarocks.loader")
package.path = (os.getenv("KONG_LUA_PATH_OVERRIDE") or "") .. "./?.lua;./?/init.lua;" .. package.path

require("kong.cmd.init")(arg)

-- vim: set ft=lua ts=2 sw=2 sts=2 et :
2 changes: 2 additions & 0 deletions bin/kong-health
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ end


run(arg)

-- vim: set ft=lua ts=2 sw=2 sts=2 et :

1 comment on commit d6cd28f

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:d6cd28fd72bc88a3d44098e694ab277d0ebab328
Artifacts available https://github.com/Kong/kong/actions/runs/4344048261

Please sign in to comment.