Fix rule name in URL

Signed-off-by: Mathieu Rul <mathroule@gmail.com>
pull/579/head
Mathieu Rul 2 years ago
parent 211cff384b
commit d5afff11af
No known key found for this signature in database
GPG Key ID: 80FEB484670CEF0E

@ -597,31 +597,31 @@ class CommandLineTestCase(unittest.TestCase):
'"defaultConfiguration": {"level": "error"}, "properties": {' '"defaultConfiguration": {"level": "error"}, "properties": {'
'"description": "trailing spaces", "tags": [], "queryUri": ' '"description": "trailing spaces", "tags": [], "queryUri": '
'"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' '"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.trailing-spaces"}, "shortDescription": {"text": ' '-yamllint.rules.trailing_spaces"}, "shortDescription": {"text": '
'"trailing spaces"}, "fullDescription": {"text": "trailing ' '"trailing spaces"}, "fullDescription": {"text": "trailing '
'spaces"}, "helpUri": ' 'spaces"}, "helpUri": '
'"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' '"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.trailing-spaces", "help": {"text": "More info: ' '-yamllint.rules.trailing_spaces", "help": {"text": "More info: '
'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' 'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.trailing-spaces", "markdown": "[More info](' '-yamllint.rules.trailing_spaces", "markdown": "[More info]('
'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' 'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.trailing-spaces)"}}, {"id": ' '-yamllint.rules.trailing_spaces)"}}, {"id": '
'"new-line-at-end-of-file", "name": "NewLineAtEndOfFile", ' '"new-line-at-end-of-file", "name": "NewLineAtEndOfFile", '
'"defaultConfiguration": {"level": "error"}, "properties": {' '"defaultConfiguration": {"level": "error"}, "properties": {'
'"description": "no new line character at the end of file", ' '"description": "no new line character at the end of file", '
'"tags": [], "queryUri": ' '"tags": [], "queryUri": '
'"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' '"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.new-line-at-end-of-file"}, "shortDescription": ' '-yamllint.rules.new_line_at_end_of_file"}, "shortDescription": '
'{"text": "no new line character at the end of file"}, ' '{"text": "no new line character at the end of file"}, '
'"fullDescription": {"text": "no new line character at the end ' '"fullDescription": {"text": "no new line character at the end '
'of file"}, "helpUri": ' 'of file"}, "helpUri": '
'"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' '"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.new-line-at-end-of-file", "help": {"text": ' '-yamllint.rules.new_line_at_end_of_file", "help": {"text": '
'"More info: https://yamllint.readthedocs.io/en/v1.32.0/rules' '"More info: https://yamllint.readthedocs.io/en/v1.32.0/rules'
'.html#module-yamllint.rules.new-line-at-end-of-file", ' '.html#module-yamllint.rules.new_line_at_end_of_file", '
'"markdown": "[More info](' '"markdown": "[More info]('
'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' 'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.new-line-at-end-of-file)"}}]}}, "results": [{' '-yamllint.rules.new_line_at_end_of_file)"}}]}}, "results": [{'
'"ruleId": "trailing-spaces", "ruleIndex": 0, "message": {' '"ruleId": "trailing-spaces", "ruleIndex": 0, "message": {'
'"text": "trailing spaces (trailing-spaces)"}, "locations": [{' '"text": "trailing spaces (trailing-spaces)"}, "locations": [{'
'"physicalLocation": {"artifactLocation": {"uri": "%s", ' '"physicalLocation": {"artifactLocation": {"uri": "%s", '
@ -651,16 +651,16 @@ class CommandLineTestCase(unittest.TestCase):
'"defaultConfiguration": {"level": "warning"}, "properties": {' '"defaultConfiguration": {"level": "warning"}, "properties": {'
'"description": "missing document start \\"---\\"", "tags": [], ' '"description": "missing document start \\"---\\"", "tags": [], '
'"queryUri": "https://yamllint.readthedocs.io/en/v1.32.0/rules' '"queryUri": "https://yamllint.readthedocs.io/en/v1.32.0/rules'
'.html#module-yamllint.rules.document-start"}, ' '.html#module-yamllint.rules.document_start"}, '
'"shortDescription": {"text": "missing document start ' '"shortDescription": {"text": "missing document start '
'\\"---\\""}, "fullDescription": {"text": "missing document ' '\\"---\\""}, "fullDescription": {"text": "missing document '
'start \\"---\\""}, "helpUri": ' 'start \\"---\\""}, "helpUri": '
'"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' '"https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.document-start", "help": {"text": "More info: ' '-yamllint.rules.document_start", "help": {"text": "More info: '
'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' 'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.document-start", "markdown": "[More info](' '-yamllint.rules.document_start", "markdown": "[More info]('
'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module' 'https://yamllint.readthedocs.io/en/v1.32.0/rules.html#module'
'-yamllint.rules.document-start)"}}]}}, "results": [{"ruleId": ' '-yamllint.rules.document_start)"}}]}}, "results": [{"ruleId": '
'"document-start", "ruleIndex": 0, "message": {"text": "missing ' '"document-start", "ruleIndex": 0, "message": {"text": "missing '
'document start \\"---\\" (document-start)"}, "locations": [{' 'document start \\"---\\" (document-start)"}, "locations": [{'
'"physicalLocation": {"artifactLocation": {"uri": "%s", ' '"physicalLocation": {"artifactLocation": {"uri": "%s", '

@ -67,7 +67,7 @@ def format_results(results, no_warn):
def format_rule(problem): def format_rule(problem):
uri = 'https://yamllint.readthedocs.io/en/v%s/rules.html#module-yamllint' \ uri = 'https://yamllint.readthedocs.io/en/v%s/rules.html#module-yamllint' \
'.rules.%s' % (APP_VERSION, problem.rule) '.rules.%s' % (APP_VERSION, problem.rule.replace('-', '_'))
name = ''.join([word.capitalize() for word in problem.rule.split('-')]) name = ''.join([word.capitalize() for word in problem.rule.split('-')])

Loading…
Cancel
Save