Config: Allow 'enable' keyword for rules

In the same manner as 'disable', 'enable' allows setting a rule on
without worrying about its options.
This commit is contained in:
Adrien Vergé
2016-03-06 07:44:32 +01:00
parent 69ef9a7272
commit 8fca8a7a33
7 changed files with 22 additions and 14 deletions

View File

@@ -80,7 +80,7 @@ class KeyDuplicatesTestCase(RuleTestCase):
': 1\n', conf)
def test_enabled(self):
conf = 'key-duplicates: {}'
conf = 'key-duplicates: enable'
self.check('---\n'
'block mapping:\n'
' key: a\n'
@@ -149,7 +149,7 @@ class KeyDuplicatesTestCase(RuleTestCase):
problem4=(7, 3))
def test_key_tokens_in_flow_sequences(self):
conf = 'key-duplicates: {}'
conf = 'key-duplicates: enable'
self.check('---\n'
'[\n'
' flow: sequence, with, key: value, mappings\n'