CI: be a little more chatty with the language lists
This commit is contained in:
parent
6176fb4d12
commit
fc19b17fc7
@ -132,14 +132,14 @@ class EditingOutputter(object):
|
|||||||
nextmark += 1
|
nextmark += 1
|
||||||
if l.startswith(mark_text):
|
if l.startswith(mark_text):
|
||||||
break
|
break
|
||||||
if nextmark > mark + 100 or nextmark > len(lines) - 4:
|
if nextmark > mark + 150 or nextmark > len(lines) - 4:
|
||||||
# Try to catch runaway nextmarks: we know there should
|
# Try to catch runaway nextmarks: we know there should
|
||||||
# be four set-lines, which are unlikely to be 3 lines each;
|
# be four set-lines, which are unlikely to be 3 lines each;
|
||||||
# similarly the CMakeLists.txt is supposed to end with
|
# similarly the CMakeLists.txt is supposed to end with
|
||||||
# some boilerplate.
|
# some boilerplate.
|
||||||
#
|
#
|
||||||
# However, gersemi will reformat to one-language-per-line,
|
# However, gersemi will reformat to one-language-per-line,
|
||||||
# so we can get really long sections, that's why we use 100 as a limit.
|
# so we can get really long sections, that's why we use 150 as a limit.
|
||||||
raise TXError("Could not find end of TX settings in CMakeLists.txt")
|
raise TXError("Could not find end of TX settings in CMakeLists.txt")
|
||||||
self.post_lines = lines[nextmark:]
|
self.post_lines = lines[nextmark:]
|
||||||
|
|
||||||
@ -175,13 +175,13 @@ def output_langs(all_langs, outputter, label, filterfunc):
|
|||||||
out = " ".join(["set( _tx_%s" % label, " ".join(sorted(these_langs)), ")"])
|
out = " ".join(["set( _tx_%s" % label, " ".join(sorted(these_langs)), ")"])
|
||||||
width = 68
|
width = 68
|
||||||
prefix = ""
|
prefix = ""
|
||||||
|
trailer = f" # {len(these_langs)} languages" # Comment at the end of the CMake line
|
||||||
while len(out) > width - len(prefix):
|
while len(out) > width - len(prefix):
|
||||||
chunk = out[:out[:width].rfind(" ")]
|
chunk = out[:out[:width].rfind(" ")]
|
||||||
outputter.print("%s%s" % (prefix, chunk))
|
outputter.print("%s%s" % (prefix, chunk))
|
||||||
out = out[len(chunk)+1:]
|
out = out[len(chunk)+1:]
|
||||||
prefix = " "
|
prefix = " "
|
||||||
outputter.print("%s%s" % (prefix, out))
|
outputter.print(f"{prefix}{out}{trailer}")
|
||||||
|
|
||||||
|
|
||||||
def get_tx_stats(languages, outputter, verbose):
|
def get_tx_stats(languages, outputter, verbose):
|
||||||
|
Loading…
Reference in New Issue
Block a user