From 30996359efbba90ce03ac3de7e39f20db9ce486b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 5 Aug 2017 21:10:21 +0200 Subject: [PATCH] clint: allow starting brace after `enum` --- src/clint.py | 3 ++- test/functional/ui/wildmode_spec.lua | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clint.py b/src/clint.py index 69a061d2ab..4a41650ec4 100755 --- a/src/clint.py +++ b/src/clint.py @@ -2613,7 +2613,8 @@ def CheckBraces(filename, clean_lines, linenum, error): func_start_linenum += 1 else: - if clean_lines.lines[func_start_linenum].endswith('{'): + func_start = clean_lines.lines[func_start_linenum] + if not func_start.startswith('enum ') and func_start.endswith('{'): error(filename, func_start_linenum, 'readability/braces', 5, 'Brace starting function body must be placed ' diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 42c92c4c2c..209b0bdfec 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -2,7 +2,6 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear, feed, command = helpers.clear, helpers.feed, helpers.command local iswin, set_shell_powershell = helpers.iswin, helpers.set_shell_powershell -local nvim_dir = helpers.nvim_dir local funcs = helpers.funcs local eq = helpers.eq local eval = helpers.eval