From 0abb7f5cda95d326cdf3776c1b984a4b58c9f32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borja=20Dom=C3=ADnguez?= Date: Sun, 26 Mar 2023 19:04:21 +0200 Subject: [PATCH] Add supported platforms to all_linters.md --- .automation/build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index ecb85a6be94..a87003d7507 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -2544,6 +2544,7 @@ def generate_documentation_all_linters(): linters.sort(key=lambda x: x.linter_name) table_header = [ "Linter", + "Supported Platforms", "Version", "License", "Popularity", @@ -2711,9 +2712,15 @@ def generate_documentation_all_linters(): f"[![GitHub stars](https://img.shields.io/github/stars/{repo}?cacheSeconds=3600)]" f"(https://github.com/{repo}){{target=_blank}}" ) + supported_platforms = [] + # supported platforms + if (hasattr(linter, "supported_platforms") and + "platform" in linter.supported_platforms): + supported_platforms += linter.supported_platforms["platform"] # line table_line = [ linter.linter_name, + ", ".join(supported_platforms), linter_version, license, "N/A", @@ -2730,6 +2737,7 @@ def generate_documentation_all_linters(): linter_doc_links += [link] md_table_line = [ md_linter_name, + "
".join(supported_platforms), linter_version, md_license, md_popularity, @@ -2770,10 +2778,10 @@ def generate_documentation_all_linters(): outfile.write("\n\n") outfile.write("# References\n\n") outfile.write( - "| Linter | Version | License | Popularity | Descriptors | Ref | URL |\n" + "| Linter | Supported Platforms | Version | License | Popularity | Descriptors | Ref | URL |\n" ) outfile.write( - "| :---- | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" + "| :---- | :-----: | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" ) for md_table_line in md_table_lines: outfile.write("| %s |\n" % " | ".join(md_table_line))