Revert "Add E040: $(COMMAND) preferred over COMMAND"
This reverts commit 43ad17be02.
The world is not quite ready for this (it breaks devstack completely).
We should probably have this as a non-failing warning-level (we
currently don't have the concept of warnings v errors).
Change-Id: Ife310e96fecf9fc297259d6e99ea09a5ef938a33
This commit is contained in:
@@ -44,5 +44,4 @@ Obsolete and deprecated syntax
|
||||
|
||||
Rules to identify obsolete and deprecated syntax that should not be used
|
||||
|
||||
- E040: $(COMMAND) preferred over `COMMAND`
|
||||
- E041: Usage of $[ for arithmetic is deprecated for $((
|
||||
|
||||
@@ -77,11 +77,6 @@ def check_function_decl(line, report):
|
||||
'"^function name {$"', line)
|
||||
|
||||
|
||||
def check_backticks(line, report):
|
||||
if re.search('\`.*`', line):
|
||||
report.print_error('E040: $(COMMAND) preferred over `COMMAND`', line)
|
||||
|
||||
|
||||
def starts_multiline(line):
|
||||
m = re.search("[^<]<<\s*(?P<token>\w+)", line)
|
||||
if m:
|
||||
@@ -193,7 +188,6 @@ class BashateRun(object):
|
||||
check_for_do(logical_line, report)
|
||||
check_if_then(logical_line, report)
|
||||
check_function_decl(logical_line, report)
|
||||
check_backticks(logical_line, report)
|
||||
check_arithmetic(logical_line, report)
|
||||
|
||||
prev_line = logical_line
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# E040
|
||||
value=`echo TEST`
|
||||
@@ -107,12 +107,6 @@ class TestBashateSamples(base.TestCase):
|
||||
self.assert_error_found('E011', 3)
|
||||
self.assert_error_found('E011', 6)
|
||||
|
||||
def test_sample_E040(self):
|
||||
test_files = ['bashate/tests/samples/E040_bad.sh']
|
||||
self.run.check_files(test_files, False)
|
||||
|
||||
self.assert_error_found('E040', 4)
|
||||
|
||||
def test_sample_E041(self):
|
||||
test_files = ['bashate/tests/samples/E041_bad.sh']
|
||||
self.run.check_files(test_files, False)
|
||||
|
||||
Reference in New Issue
Block a user