Grammalecte  Check-in [ff05e3b47e]

Overview
Comment:[core][fr] untested rules: display update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | core
Files: files | file ages | folders
SHA3-256: ff05e3b47e7f6197c25bce7cbd8f51833f58117eea1b3cbff904db0e5404b966
User & Date: olr on 2020-05-09 11:22:38
Other Links: manifest | tags
Context
2020-05-09
11:50
[fr] ajustements [core] remove legacy code check-in: b85ddf9604 user: olr tags: trunk, fr, core
11:22
[core][fr] untested rules: display update check-in: ff05e3b47e user: olr tags: trunk, fr, core
11:03
[fr] ajustements et faux positifs check-in: 1414c08368 user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/modules/tests.py from [e401504721] to [b8be0feaa5].

201
202
203
204
205
206
207
208
209
210
211

212

213

214
215
216
217
218
219
220
201
202
203
204
205
206
207

208
209

210
211
212

213
214
215
216
217
218
219
220







-


-
+

+
-
+







                              "\n  found:    " + sFoundSuggs + \
                              "\n  errors:   \n" + sListErr)
                        nError += 1
            if nError:
                print("Unexpected errors:", nError)
        # untested rules
        i = 0
        echo("Untested rules:")
        for _, sOpt, sLineId, sRuleId in gce.listRules():
            if sOpt != "@@@@" and sRuleId not in self._aTestedRules and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
                echo(sLineId + "/" + sRuleId)
                echo(f"# untested rule: {sLineId}/{sRuleId}")
                i += 1
        if i:
        echo("[{} untested rules]".format(i))
            echo("  [{} untested rules]".format(i))

    def _splitTestLine (self, sLine):
        sText, sSugg = sLine.split("->>")
        return (sText.strip(), sSugg.strip())

    def _getFoundErrors (self, sLine, sOption):
        if sOption: