Revert "Add global "locale" config option"

This reverts commit 9e90c77, because it caused a bug that affected
different people just after being released:
https://github.com/adrienverge/yamllint/issues/285
https://github.com/adrienverge/yamllint/issues/286
This commit is contained in:
Adrien Vergé
2020-07-15 14:46:21 +02:00
parent 0016390e78
commit 9403f1f3ec
6 changed files with 16 additions and 138 deletions

View File

@@ -35,8 +35,6 @@ class YamlLintConfig(object):
self.yaml_files = pathspec.PathSpec.from_lines(
'gitwildmatch', ['*.yaml', '*.yml', '.yamllint'])
self.locale = 'C.UTF-8'
if file is not None:
with open(file) as f:
content = f.read()
@@ -113,12 +111,6 @@ class YamlLintConfig(object):
self.yaml_files = pathspec.PathSpec.from_lines('gitwildmatch',
conf['yaml-files'])
if 'locale' in conf:
if not isinstance(conf['locale'], str):
raise YamlLintConfigError(
'invalid config: locale should be a string')
self.locale = conf['locale']
def validate(self):
for id in self.rules:
try: