diff --git a/README.rst b/README.rst index b2f9b1d..439f16e 100644 --- a/README.rst +++ b/README.rst @@ -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 $(( diff --git a/bashate/bashate.py b/bashate/bashate.py index 5ef876c..5c47869 100644 --- a/bashate/bashate.py +++ b/bashate/bashate.py @@ -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\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 diff --git a/bashate/tests/samples/E040_bad.sh b/bashate/tests/samples/E040_bad.sh deleted file mode 100644 index 4f44c11..0000000 --- a/bashate/tests/samples/E040_bad.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# E040 -value=`echo TEST` diff --git a/bashate/tests/test_bashate.py b/bashate/tests/test_bashate.py index 2e22b6c..5c98169 100644 --- a/bashate/tests/test_bashate.py +++ b/bashate/tests/test_bashate.py @@ -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)