valentjn/vscode-ltex

Python docstrings are not checked

vepain opened this issue · 1 comments

LTeX is not checking python docstring content.

Describe the bug
Python docstring content may not be parsed.

Steps to reproduce

  • Create MWE:
"""I'm a error"""

# I'm a error
  • Check current document with LTeX
  • Line comment that begins with # is parsed and the error of use an instead of a is raised

Expected behavior
The same error should be raised for the content into the docstring.
Especially (not shown in the MWE), it should work for multiple line docstrings

Sample document

"""I'm a error"""

# I'm a error

LTeX configuration

{
  "enabled": [
    "bibtex",
    "context",
    "context.tex",
    "html",
    "latex",
    "markdown",
    "org",
    "restructuredtext",
    "rsweave",
    "python",
    "rust",
    "r",
    "shellscript"
  ],
  "language": "en-GB",
  "dictionary": {},
  "disabledRules": {},
  "enabledRules": {},
  "hiddenFalsePositives": {},
  "bibtex": {
    "fields": {}
  },
  "latex": {
    "commands": {},
    "environments": {}
  },
  "markdown": {
    "nodes": {}
  },
  "configurationTarget": {
    "dictionary": "workspaceFolderExternalFile",
    "disabledRules": "workspaceFolderExternalFile",
    "hiddenFalsePositives": "workspaceFolderExternalFile"
  },
  "additionalRules": {
    "enablePickyRules": false,
    "motherTongue": "",
    "languageModel": "",
    "neuralNetworkModel": "",
    "word2VecModel": ""
  },
  "languageToolHttpServerUri": "",
  "languageToolOrg": {
    "username": "",
    "apiKey": ""
  },
  "ltex-ls": {
    "path": "",
    "logLevel": "fine",
    "languageToolHttpServerUri": "",
    "languageToolOrgUsername": "",
    "languageToolOrgApiKey": ""
  },
  "java": {
    "path": "",
    "initialHeapSize": 64,
    "maximumHeapSize": 512
  },
  "sentenceCacheSize": 2000,
  "completionEnabled": false,
  "diagnosticSeverity": "information",
  "checkFrequency": "edit",
  "clearDiagnosticsWhenClosingFile": true,
  "statusBarItem": false,
  "trace": {
    "server": "verbose"
  }
}

"LTeX Language Server" log file

[... truncated]
	at java.base/java.util.regex.Pattern$GroupTail.match(Unknown Source)
	at java.base/java.util.regex.Pattern$BranchConn.match(Unknown Source)
	at java.base/java.util.regex.Pattern$CharProperty.match(Unknown Source)
	at java.base/java.util.regex.Pattern$Neg.match(Unknown Source)
	at java.base/java.util.regex.Pattern$Branch.match(Unknown Source)
	at java.base/java.util.regex.Pattern$GroupHead.match(Unknown Source)
	at java.base/java.util.regex.Pattern$LazyLoop.match(Unknown Source)
	at java.base/java.util.regex.Pattern$GroupTail.match(Unknown Source)

mars 29, 2023 8:26:56 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:26:56 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:26:58 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:26:58 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:26:59 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:26:59 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:00 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:00 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:00 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:00 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:01 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:01 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:02 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:02 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:02 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:02 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:03 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:03 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:04 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:04 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:04 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:04 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:07 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:07 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:08 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:08 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:10 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:10 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:10 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: ""
mars 29, 2023 8:27:10 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:14 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\n"
mars 29, 2023 8:27:14 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:15 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI"
mars 29, 2023 8:27:15 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:15 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI "
mars 29, 2023 8:27:15 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:16 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI'm "
mars 29, 2023 8:27:16 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 0 rule matches
mars 29, 2023 8:27:17 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI'm a r"
mars 29, 2023 8:27:17 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 1 rule match
mars 29, 2023 8:27:17 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
AVERTISSEMENT: Unmatched cancel notification for request id 71
mars 29, 2023 8:27:18 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI'm a e"
mars 29, 2023 8:27:18 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 1 rule match
mars 29, 2023 8:27:18 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
PRÉCIS: Checking the following text in language 'en-GB' via LanguageTool: "\n\n\nI'm a error"
mars 29, 2023 8:27:18 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
PRÉCIS: Obtained 1 rule match

"LTeX Language Client" log file

[... truncated]
    }
}


[Trace - 08:27:18] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 6
                },
                "end": {
                    "line": 2,
                    "character": 7
                }
            },
            "severity": 3,
            "code": "EN_A_VS_AN",
            "codeDescription": {
                "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
            },
            "source": "LTeX",
            "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
        }
    ]
}


[Trace - 08:27:18] Sending notification 'textDocument/didChange'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
        "version": 48
    },
    "contentChanges": [
        {
            "text": "\"\"\"I'm a error\"\"\"\n\n# I'm a error\n"
        }
    ]
}


[Trace - 08:27:18] Received request 'window/workDoneProgress/create - (187)'.
Params: {
    "token": "{\"uri\":\"file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py\",\"operation\":\"checkDocument\",\"uuid\":\"364fa054-44f2-d121-5cd8-0fa0f436cf3d\"}"
}


[Trace - 08:27:18] Sending response 'window/workDoneProgress/create - (187)'. Processing request took 0ms
No result returned.


[Trace - 08:27:18] Received notification '$/progress'.
Params: {
    "token": "{\"uri\":\"file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py\",\"operation\":\"checkDocument\",\"uuid\":\"364fa054-44f2-d121-5cd8-0fa0f436cf3d\"}",
    "value": {
        "kind": "begin",
        "title": "Checking document",
        "cancellable": false,
        "message": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    }
}


[Trace - 08:27:18] Received request 'workspace/configuration - (188)'.
Params: {
    "items": [
        {
            "scopeUri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
            "section": "ltex"
        }
    ]
}


[Trace - 08:27:18] Sending response 'workspace/configuration - (188)'. Processing request took 0ms
Result: [
    {
        "enabled": [
            "bibtex",
            "context",
            "context.tex",
            "html",
            "latex",
            "markdown",
            "org",
            "restructuredtext",
            "rsweave",
            "python",
            "rust",
            "r",
            "shellscript"
        ],
        "language": "en-GB",
        "dictionary": {},
        "disabledRules": {},
        "enabledRules": {},
        "hiddenFalsePositives": {},
        "bibtex": {
            "fields": {}
        },
        "latex": {
            "commands": {},
            "environments": {}
        },
        "markdown": {
            "nodes": {}
        },
        "configurationTarget": {
            "dictionary": "workspaceFolderExternalFile",
            "disabledRules": "workspaceFolderExternalFile",
            "hiddenFalsePositives": "workspaceFolderExternalFile"
        },
        "additionalRules": {
            "enablePickyRules": false,
            "motherTongue": "",
            "languageModel": "",
            "neuralNetworkModel": "",
            "word2VecModel": ""
        },
        "languageToolHttpServerUri": "",
        "languageToolOrg": {
            "username": "",
            "apiKey": ""
        },
        "ltex-ls": {
            "path": "",
            "logLevel": "fine",
            "languageToolHttpServerUri": "",
            "languageToolOrgUsername": "",
            "languageToolOrgApiKey": ""
        },
        "java": {
            "path": "",
            "initialHeapSize": 64,
            "maximumHeapSize": 512
        },
        "sentenceCacheSize": 2000,
        "completionEnabled": false,
        "diagnosticSeverity": "information",
        "checkFrequency": "edit",
        "clearDiagnosticsWhenClosingFile": true,
        "statusBarItem": false,
        "trace": {
            "server": "verbose"
        }
    }
]


[Trace - 08:27:18] Received request 'ltex/workspaceSpecificConfiguration - (189)'.
Params: {
    "items": [
        {
            "scopeUri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
            "section": "ltex"
        }
    ]
}


[Trace - 08:27:18] Sending response 'ltex/workspaceSpecificConfiguration - (189)'. Processing request took 34ms
Result: [
    {
        "dictionary": {
            "auto": [],
            "ar": [],
            "ast-ES": [],
            "be-BY": [],
            "br-FR": [],
            "ca-ES": [],
            "ca-ES-valencia": [],
            "da-DK": [],
            "de": [],
            "de-AT": [],
            "de-CH": [],
            "de-DE": [],
            "de-DE-x-simple-language": [],
            "el-GR": [],
            "en": [],
            "en-AU": [],
            "en-CA": [],
            "en-GB": [
                "ADirF",
                "AInvF",
                "Andonov",
                "contig",
                "contigs",
                "csv-like",
                "DirF",
                "docstrings",
                "DOCU",
                "Epain",
                "eulerian",
                "FASTA",
                "GUROBI",
                "Gurobi",
                "htmlcov",
                "iif",
                "InvF",
                "Khloraa",
                "khloraa",
                "khloraascaf",
                "Kloraascaf",
                "Lavenier",
                "Mypy",
                "OccOrCT",
                "OrCT",
                "PDirF",
                "PInvF",
                "PuLP",
                "pylint",
                "PyPI",
                "Pytest",
                "Readthedocs",
                "RegEx",
                "TODO",
                "TOTEST",
                "VSCode"
            ],
            "en-NZ": [],
            "en-US": [],
            "en-ZA": [],
            "eo": [],
            "es": [],
            "es-AR": [],
            "fa": [],
            "fr": [],
            "ga-IE": [],
            "gl-ES": [],
            "it": [],
            "ja-JP": [],
            "km-KH": [],
            "nl": [],
            "nl-BE": [],
            "pl-PL": [],
            "pt": [],
            "pt-AO": [],
            "pt-BR": [],
            "pt-MZ": [],
            "pt-PT": [],
            "ro-RO": [],
            "ru-RU": [],
            "sk-SK": [],
            "sl-SI": [],
            "sv": [],
            "ta-IN": [],
            "tl-PH": [],
            "uk-UA": [],
            "zh-CN": []
        },
        "disabledRules": {
            "auto": [],
            "ar": [],
            "ast-ES": [],
            "be-BY": [],
            "br-FR": [],
            "ca-ES": [],
            "ca-ES-valencia": [],
            "da-DK": [],
            "de": [],
            "de-AT": [],
            "de-CH": [],
            "de-DE": [],
            "de-DE-x-simple-language": [],
            "el-GR": [],
            "en": [],
            "en-AU": [],
            "en-CA": [],
            "en-GB": [
                "ARROWS",
                "OXFORD_SPELLING_Z_NOT_S"
            ],
            "en-NZ": [],
            "en-US": [],
            "en-ZA": [],
            "eo": [],
            "es": [],
            "es-AR": [],
            "fa": [],
            "fr": [],
            "ga-IE": [],
            "gl-ES": [],
            "it": [],
            "ja-JP": [],
            "km-KH": [],
            "nl": [],
            "nl-BE": [],
            "pl-PL": [],
            "pt": [],
            "pt-AO": [],
            "pt-BR": [],
            "pt-MZ": [],
            "pt-PT": [],
            "ro-RO": [],
            "ru-RU": [],
            "sk-SK": [],
            "sl-SI": [],
            "sv": [],
            "ta-IN": [],
            "tl-PH": [],
            "uk-UA": [],
            "zh-CN": []
        },
        "enabledRules": {
            "auto": [],
            "ar": [],
            "ast-ES": [],
            "be-BY": [],
            "br-FR": [],
            "ca-ES": [],
            "ca-ES-valencia": [],
            "da-DK": [],
            "de": [],
            "de-AT": [],
            "de-CH": [],
            "de-DE": [],
            "de-DE-x-simple-language": [],
            "el-GR": [],
            "en": [],
            "en-AU": [],
            "en-CA": [],
            "en-GB": [],
            "en-NZ": [],
            "en-US": [],
            "en-ZA": [],
            "eo": [],
            "es": [],
            "es-AR": [],
            "fa": [],
            "fr": [],
            "ga-IE": [],
            "gl-ES": [],
            "it": [],
            "ja-JP": [],
            "km-KH": [],
            "nl": [],
            "nl-BE": [],
            "pl-PL": [],
            "pt": [],
            "pt-AO": [],
            "pt-BR": [],
            "pt-MZ": [],
            "pt-PT": [],
            "ro-RO": [],
            "ru-RU": [],
            "sk-SK": [],
            "sl-SI": [],
            "sv": [],
            "ta-IN": [],
            "tl-PH": [],
            "uk-UA": [],
            "zh-CN": []
        },
        "hiddenFalsePositives": {
            "auto": [],
            "ar": [],
            "ast-ES": [],
            "be-BY": [],
            "br-FR": [],
            "ca-ES": [],
            "ca-ES-valencia": [],
            "da-DK": [],
            "de": [],
            "de-AT": [],
            "de-CH": [],
            "de-DE": [],
            "de-DE-x-simple-language": [],
            "el-GR": [],
            "en": [],
            "en-AU": [],
            "en-CA": [],
            "en-GB": [
                "{\"rule\":\"DOUBLE_PUNCTUATION\",\"sentence\":\"^\\\\QFor re-use: All dependencies are stored in ../config/requirements-tests.txt.\\\\E$\"}",
                "{\"rule\":\"MORFOLOGIK_RULE_EN_GB\",\"sentence\":\"^\\\\Q---------------------------------------------------------------------------- #\\nFmt_oriented_contig_paths_file                        #\\n---------------------------------------------------------------------------- #\\\\E$\"}",
                "{\"rule\":\"MORFOLOGIK_RULE_EN_GB\",\"sentence\":\"^\\\\Qpylint: disable=compare-to-zero,missing-raises-doc\\\\E$\"}",
                "{\"rule\":\"THE_SUPERLATIVE\",\"sentence\":\"^\\\\Qpipeline status coverage report Latest Release\\\\E$\"}",
                "{\"rule\":\"UNLIKELY_OPENING_PUNCTUATION\",\"sentence\":\"^\\\\Q:alias of: \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q (\\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q, \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q)\\\\E$\"}",
                "{\"rule\":\"UPPERCASE_SENTENCE_START\",\"sentence\":\"^\\\\Qm: Required arguments in CLI are now positional arguments\\nm: Fix English typos:\\n\\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q -> \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q\\n\\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q -> \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q\\n\\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q -> \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q\\nm: Rename \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q to \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q to use it not only for filename but as string codes\\nm: Use small cases for solver name\\nm: Constants for solver log filenames: general log extension and use solver name instead of specific solver constant name for logs\\np: Solver logs filename follow the convention \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q\\np: Use \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q files only for module path shortcuts\\nm: Fix typo on \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q.\\\\E$\"}"
            ],
            "en-NZ": [],
            "en-US": [],
            "en-ZA": [],
            "eo": [],
            "es": [],
            "es-AR": [],
            "fa": [],
            "fr": [],
            "ga-IE": [],
            "gl-ES": [],
            "it": [],
            "ja-JP": [],
            "km-KH": [],
            "nl": [],
            "nl-BE": [],
            "pl-PL": [],
            "pt": [],
            "pt-AO": [],
            "pt-BR": [],
            "pt-MZ": [],
            "pt-PT": [],
            "ro-RO": [],
            "ru-RU": [],
            "sk-SK": [],
            "sl-SI": [],
            "sv": [],
            "ta-IN": [],
            "tl-PH": [],
            "uk-UA": [],
            "zh-CN": []
        }
    }
]


[Trace - 08:27:18] Received notification '$/progress'.
Params: {
    "token": "{\"uri\":\"file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py\",\"operation\":\"checkDocument\",\"uuid\":\"364fa054-44f2-d121-5cd8-0fa0f436cf3d\"}",
    "value": {
        "kind": "end"
    }
}


[Trace - 08:27:18] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 6
                },
                "end": {
                    "line": 2,
                    "character": 7
                }
            },
            "severity": 3,
            "code": "EN_A_VS_AN",
            "codeDescription": {
                "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
            },
            "source": "LTeX",
            "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
        }
    ]
}


[Trace - 08:27:18] Sending request 'textDocument/codeAction - (72)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 13
        }
    },
    "context": {
        "diagnostics": []
    }
}


[Trace - 08:27:18] Received response 'textDocument/codeAction - (72)' in 2ms.
Result: []


[Trace - 08:27:18] Sending request 'textDocument/codeAction - (73)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 13
        }
    },
    "context": {
        "diagnostics": []
    }
}


[Trace - 08:27:18] Received response 'textDocument/codeAction - (73)' in 4ms.
Result: []


[Trace - 08:27:19] Sending notification 'textDocument/didSave'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    }
}


[Trace - 08:27:19] Sending request 'textDocument/codeAction - (74)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 13
        }
    },
    "context": {
        "diagnostics": []
    }
}


[Trace - 08:27:19] Received response 'textDocument/codeAction - (74)' in 4ms.
Result: []


[Trace - 08:27:20] Sending request 'textDocument/codeAction - (75)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 2,
            "character": 6
        },
        "end": {
            "line": 2,
            "character": 7
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'.",
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang%3Den-GB"
                },
                "severity": 3,
                "source": "LTeX"
            }
        ],
        "only": [
            "quickfix"
        ]
    }
}


[Trace - 08:27:20] Received response 'textDocument/codeAction - (75)' in 2ms.
Result: [
    {
        "title": "Use 'an'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 48,
                        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 2,
                                    "character": 6
                                },
                                "end": {
                                    "line": 2,
                                    "character": 7
                                }
                            },
                            "newText": "an"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Hide false positive",
        "kind": "quickfix.ltex.hideFalsePositives",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "command": {
            "title": "Hide false positive",
            "command": "_ltex.hideFalsePositives",
            "arguments": [
                {
                    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
                    "falsePositives": {
                        "en-GB": [
                            "{\"rule\":\"EN_A_VS_AN\",\"sentence\":\"^\\\\QI'm a error\\\\E$\"}"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Disable rule",
        "kind": "quickfix.ltex.disableRules",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "command": {
            "title": "Disable rule",
            "command": "_ltex.disableRules",
            "arguments": [
                {
                    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
                    "ruleIds": {
                        "en-GB": [
                            "EN_A_VS_AN"
                        ]
                    }
                }
            ]
        }
    }
]


[Trace - 08:27:20] Sending request 'textDocument/codeAction - (76)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 2,
            "character": 13
        },
        "end": {
            "line": 2,
            "character": 13
        }
    },
    "context": {
        "diagnostics": []
    }
}


[Trace - 08:27:20] Received response 'textDocument/codeAction - (76)' in 2ms.
Result: []


[Trace - 08:27:33] Sending request 'textDocument/codeAction - (77)'.
Params: {
    "textDocument": {
        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 3,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 0,
                        "character": 0
                    },
                    "end": {
                        "line": 0,
                        "character": 0
                    }
                },
                "message": "Coding magic comment not found",
                "code": "C101",
                "severity": 3,
                "source": "flake8"
            },
            {
                "range": {
                    "start": {
                        "line": 0,
                        "character": 0
                    },
                    "end": {
                        "line": 0,
                        "character": 0
                    }
                },
                "message": "First line should end with a period",
                "code": "D400",
                "severity": 3,
                "source": "flake8"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'.",
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang%3Den-GB"
                },
                "severity": 3,
                "source": "LTeX"
            }
        ]
    }
}


[Trace - 08:27:33] Received response 'textDocument/codeAction - (77)' in 3ms.
Result: [
    {
        "title": "Use 'an'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 48,
                        "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 2,
                                    "character": 6
                                },
                                "end": {
                                    "line": 2,
                                    "character": 7
                                }
                            },
                            "newText": "an"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Hide false positive",
        "kind": "quickfix.ltex.hideFalsePositives",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "command": {
            "title": "Hide false positive",
            "command": "_ltex.hideFalsePositives",
            "arguments": [
                {
                    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
                    "falsePositives": {
                        "en-GB": [
                            "{\"rule\":\"EN_A_VS_AN\",\"sentence\":\"^\\\\QI'm a error\\\\E$\"}"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Disable rule",
        "kind": "quickfix.ltex.disableRules",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 7
                    }
                },
                "severity": 3,
                "code": "EN_A_VS_AN",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-GB"
                },
                "source": "LTeX",
                "message": "Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'."
            }
        ],
        "command": {
            "title": "Disable rule",
            "command": "_ltex.disableRules",
            "arguments": [
                {
                    "uri": "file:///home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/src/khloraascaf/mwe.py",
                    "ruleIds": {
                        "en-GB": [
                            "EN_A_VS_AN"
                        ]
                    }
                }
            ]
        }
    }
]


2023-03-29T06:32:32.729Z Info: Creating bug report...
[Trace - 08:32:32] Sending request 'workspace/executeCommand - (78)'.
Params: {
    "command": "_ltex.getServerStatus",
    "arguments": []
}


[Trace - 08:32:32] Received response 'workspace/executeCommand - (78)' in 71ms.
Result: {
    "success": true,
    "processId": 2097392,
    "wallClockDuration": 827.606,
    "cpuUsage": 0,
    "cpuDuration": 39.66,
    "usedMemory": 239243024,
    "totalMemory": 281018368,
    "isChecking": false
}


2023-03-29T06:32:32.801Z Info: LTeX Status
2023-03-29T06:32:32.801Z Info: ----------------------------------------
2023-03-29T06:32:32.801Z Info: Info about vscode-ltex:
2023-03-29T06:32:32.801Z Info: - Path to extension directory: /home/vepain/.vscode/extensions/valentjn.vscode-ltex-13.1.0
2023-03-29T06:32:32.802Z Info: - Path to directory with LTeX user settings (global storage directory): /home/vepain/.config/Code/User/globalStorage/valentjn.vscode-ltex
2023-03-29T06:32:32.802Z Info: - Path to directory with LTeX workspace settings (for the currently opened workspace): /home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/.vscode
2023-03-29T06:32:32.802Z Info: - Path to directory with LTeX workspace folder settings (for the workspace folder of the currently active text editor): /home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/.vscode
2023-03-29T06:32:32.802Z Info: - Version: 13.1.0
2023-03-29T06:32:32.802Z Info: Info about ltex-ls:
2023-03-29T06:32:32.802Z Info: - Version: 15.2.0
2023-03-29T06:32:32.802Z Info: - Process ID: 2097392
2023-03-29T06:32:32.802Z Info: - Wall clock duration: 13m47s.605
2023-03-29T06:32:32.802Z Info: - CPU duration: 39s.659
2023-03-29T06:32:32.802Z Info: - CPU usage: 0.0%
2023-03-29T06:32:32.802Z Info: - Total allocated memory: 281.02MB
2023-03-29T06:32:32.802Z Info: - Used memory: 239.24MB
2023-03-29T06:32:32.803Z Info: - Is busy checking: false
2023-03-29T06:32:32.803Z Info: - Document URI being checked: n/a
2023-03-29T06:32:32.803Z Info: Currently watched external setting files:
2023-03-29T06:32:32.803Z Info: - /home/vepain/.config/Code/User/globalStorage/valentjn.vscode-ltex/ltex.dictionary.en-GB.txt
2023-03-29T06:32:32.803Z Info: - /home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/.vscode/ltex.dictionary.en-GB.txt
2023-03-29T06:32:32.803Z Info: - /home/vepain/.config/Code/User/globalStorage/valentjn.vscode-ltex/ltex.disabledRules.en-GB.txt
2023-03-29T06:32:32.803Z Info: - /home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/.vscode/ltex.disabledRules.en-GB.txt
2023-03-29T06:32:32.803Z Info: - /home/vepain/Documents/PROJETS/Khloraa/khloraa_scaffolding/.vscode/ltex.hiddenFalsePositives.en-GB.txt
2023-03-29T06:32:32.803Z Info: ----------------------------------------
2023-03-29T06:34:38.081Z Info: Creating bug report...
[Trace - 08:34:38] Sending request 'workspace/executeCommand - (79)'.
Params: {
    "command": "_ltex.getServerStatus",
    "arguments": []
}



Version information
List here the version information of the relevant software.

  • Operating system: Linux (linux), x64, 5.15.0-46-generic
  • VS Code: 1.76.2
  • vscode-ltex: 13.1.0
  • ltex-ls: 15.2.0
  • Java: 11.0.12

Thank you for your help and your great linter!

Tatsh commented

Would really like to see this, as well as --I am error (strip ^-- on every line until a line that uses --@something appears) for docstrings in Lua. This and #457