fix(default.yaml): disable empty-values & octal-values by default
* Close #204
This commit is contained in:
committed by
Adrien Vergé
parent
579a975b70
commit
7359785ea0
@@ -28,7 +28,9 @@ class OctalValuesTestCase(RuleTestCase):
|
|||||||
self.check('user-city: 0o10', conf)
|
self.check('user-city: 0o10', conf)
|
||||||
|
|
||||||
def test_implicit_octal_values(self):
|
def test_implicit_octal_values(self):
|
||||||
conf = ('octal-values: {forbid-implicit-octal: true}\n'
|
conf = ('octal-values:\n'
|
||||||
|
' forbid-implicit-octal: true\n'
|
||||||
|
' forbid-explicit-octal: false\n'
|
||||||
'new-line-at-end-of-file: disable\n'
|
'new-line-at-end-of-file: disable\n'
|
||||||
'document-start: disable\n')
|
'document-start: disable\n')
|
||||||
self.check('user-city: 010', conf, problem=(1, 15))
|
self.check('user-city: 010', conf, problem=(1, 15))
|
||||||
@@ -50,7 +52,9 @@ class OctalValuesTestCase(RuleTestCase):
|
|||||||
' - 0e3\n', conf)
|
' - 0e3\n', conf)
|
||||||
|
|
||||||
def test_explicit_octal_values(self):
|
def test_explicit_octal_values(self):
|
||||||
conf = ('octal-values: {forbid-explicit-octal: true}\n'
|
conf = ('octal-values:\n'
|
||||||
|
' forbid-implicit-octal: false\n'
|
||||||
|
' forbid-explicit-octal: true\n'
|
||||||
'new-line-at-end-of-file: disable\n'
|
'new-line-at-end-of-file: disable\n'
|
||||||
'document-start: disable\n')
|
'document-start: disable\n')
|
||||||
self.check('user-city: 0o10', conf, problem=(1, 16))
|
self.check('user-city: 0o10', conf, problem=(1, 16))
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ rules:
|
|||||||
document-start:
|
document-start:
|
||||||
level: warning
|
level: warning
|
||||||
empty-lines: enable
|
empty-lines: enable
|
||||||
empty-values: enable
|
empty-values: disable
|
||||||
hyphens: enable
|
hyphens: enable
|
||||||
indentation: enable
|
indentation: enable
|
||||||
key-duplicates: enable
|
key-duplicates: enable
|
||||||
@@ -26,7 +26,7 @@ rules:
|
|||||||
line-length: enable
|
line-length: enable
|
||||||
new-line-at-end-of-file: enable
|
new-line-at-end-of-file: enable
|
||||||
new-lines: enable
|
new-lines: enable
|
||||||
octal-values: enable
|
octal-values: disable
|
||||||
quoted-strings: disable
|
quoted-strings: disable
|
||||||
trailing-spaces: enable
|
trailing-spaces: enable
|
||||||
truthy:
|
truthy:
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ ID = 'empty-values'
|
|||||||
TYPE = 'token'
|
TYPE = 'token'
|
||||||
CONF = {'forbid-in-block-mappings': bool,
|
CONF = {'forbid-in-block-mappings': bool,
|
||||||
'forbid-in-flow-mappings': bool}
|
'forbid-in-flow-mappings': bool}
|
||||||
DEFAULT = {'forbid-in-block-mappings': False,
|
DEFAULT = {'forbid-in-block-mappings': True,
|
||||||
'forbid-in-flow-mappings': False}
|
'forbid-in-flow-mappings': True}
|
||||||
|
|
||||||
|
|
||||||
def check(conf, token, prev, next, nextnext, context):
|
def check(conf, token, prev, next, nextnext, context):
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ ID = 'octal-values'
|
|||||||
TYPE = 'token'
|
TYPE = 'token'
|
||||||
CONF = {'forbid-implicit-octal': bool,
|
CONF = {'forbid-implicit-octal': bool,
|
||||||
'forbid-explicit-octal': bool}
|
'forbid-explicit-octal': bool}
|
||||||
DEFAULT = {'forbid-implicit-octal': False,
|
DEFAULT = {'forbid-implicit-octal': True,
|
||||||
'forbid-explicit-octal': False}
|
'forbid-explicit-octal': True}
|
||||||
|
|
||||||
|
|
||||||
def check(conf, token, prev, next, nextnext, context):
|
def check(conf, token, prev, next, nextnext, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user