Skip to content

Commit

Permalink
Add supported platforms to all_linters.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bdovaz authored and bdominguez committed Apr 13, 2023
1 parent 02ea3b4 commit 2990b27
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,7 @@ def generate_documentation_all_linters():
linters.sort(key=lambda x: x.linter_name)
table_header = [
"Linter",
"Supported Platforms",
"Version",
"License",
"Popularity",
Expand Down Expand Up @@ -2715,9 +2716,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",
Expand All @@ -2734,6 +2741,7 @@ def generate_documentation_all_linters():
linter_doc_links += [link]
md_table_line = [
md_linter_name,
"<br/> ".join(supported_platforms),
linter_version,
md_license,
md_popularity,
Expand Down Expand Up @@ -2774,10 +2782,10 @@ def generate_documentation_all_linters():
outfile.write("<!-- markdownlint-disable -->\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))
Expand Down

0 comments on commit 2990b27

Please sign in to comment.