sustainable-computing-io / kepler-doc

Kepler uses eBPF to probe energy related system stats and exports as Prometheus metrics
https://sustainable-computing.io/
Apache License 2.0
13 stars 37 forks source link

docs: fix lint issues on main #154

Closed Billy99 closed 3 months ago

Billy99 commented 3 months ago

main is currently red due to lint failures. Ran super-linter locally and see lots of errors. This commits attempts to fix all the lint errors.

A handful of the errors were links to other sections of the same document in the Chinese version of the files. Both ebpf_in_kepler.md and ebpf_in_kepler.zh.md had a Contents section at the top with a link to all the other sections. This really isn't needed since the mkdocs generated website has a Table of Contents built in. By removing this, that fix a lot of the link errors. The remaining few requires assigning a name to the section being linked to (in kepler-operator.zh.md).

lint errors ``` docker run -e RUN_LOCAL=true -e DEFAULT_BRANCH=main -e LINTER_RULES_PATH=/ -e VALIDATE_MARKDOWN=true -e VALIDATE_ALL_CODEBASE=true -v /home/$USER/src/kepler-doc:/tmp/lint --rm ghcr.io/super-linter/super-linter:v6.3.0 : /tmp/lint/docs/design/architecture.zh.md:8:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/design/ebpf_in_kepler.zh.md:4:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:5:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:6:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:6:7 MD051/link-fragments Link fragments should be valid [Context: "[什么是kprobe?](#什么是kprobe?)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:7:1 MD007/ul-indent Unordered list indentation [Expected: 4; Actual: 6] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:7:9 MD051/link-fragments Link fragments should be valid [Context: "[如何查看已经注册的kprobes?](#如何查看已经注册的kprobes?)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:8:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 4] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:8:7 MD051/link-fragments Link fragments should be valid [Context: "[CPU硬件事件监控](#CPU硬件事件监控)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:9:1 MD007/ul-indent Unordered list indentation [Expected: 4; Actual: 6] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:9:9 MD051/link-fragments Link fragments should be valid [Context: "[如何检查Linux内核是否支持perf_event_open?](#如何检查Linux内核是否支持perf_event_open?)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:10:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:11:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:11:4 MD051/link-fragments Link fragments should be valid [Context: "[Kepler监控CPU硬件事件](#Kepler监控CPU硬件事件)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:12:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:12:4 MD051/link-fragments Link fragments should be valid [Context: "[计算进程CPU运行总时间](#计算进程CPU运行总时间)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:13:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:13:4 MD051/link-fragments Link fragments should be valid [Context: "[计算进程CPU周期](#计算进程CPU周期)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:14:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:14:4 MD051/link-fragments Link fragments should be valid [Context: "[计算进程参考CPU周期](#计算进程参考CPU周期)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:15:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:15:4 MD051/link-fragments Link fragments should be valid [Context: "[计算进程CPU指令](#计算进程CPU指令)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:16:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:16:4 MD051/link-fragments Link fragments should be valid [Context: "[计算进程缓存失效](#计算进程缓存失效)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:17:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:17:4 MD051/link-fragments Link fragments should be valid [Context: "[计算CPU上平均频率](#计算CPU上平均频率)"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:18:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:19:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:26:15 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:30 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:44 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:65 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:86 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:118 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:147:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:149:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:151:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/design/ebpf_in_kepler.zh.md:153:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/design/power_model.zh.md:25:1 MD055/table-pipe-style Table pipe style [Expected: no_leading_or_trailing; Actual: leading_and_trailing; Unexpected leading pipe] /tmp/lint/docs/design/power_model.zh.md:25:3 MD055/table-pipe-style Table pipe style [Expected: no_leading_or_trailing; Actual: leading_and_trailing; Unexpected trailing pipe] /tmp/lint/docs/design/power_model.zh.md:25:3 MD056/table-column-count Table column count [Expected: 4; Actual: 2; Too few cells, row will be missing data] /tmp/lint/docs/index.zh.md:16:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:16:27 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/installation/community-operator.zh.md:18:56 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] /tmp/lint/docs/installation/community-operator.zh.md:19:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:22:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:25:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:43:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:44:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:48:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/community-operator.zh.md:56:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/kepler-operator.zh.md:3:6 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: ':'] /tmp/lint/docs/installation/kepler-operator.zh.md:9:41 MD051/link-fragments Link fragments should be valid [Context: "[local cluster for testing](#run-a-kind-cluster-locally)"] /tmp/lint/docs/installation/kepler-operator.zh.md:53:84 MD051/link-fragments Link fragments should be valid [Context: "[请看考以下步骤](#scrape-all-namespaces)"] /tmp/lint/docs/installation/kepler-operator.zh.md:55 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] /tmp/lint/docs/installation/kepler-operator.zh.md:95:1 MD045/no-alt-text Images should have alternate text (alt text) /tmp/lint/docs/installation/kepler-operator.zh.md:133:6 MD051/link-fragments Link fragments should be valid [Context: "[local cluster](#run-a-kind-cluster-locally)"] /tmp/lint/docs/installation/kepler.md:65 MD046/code-block-style Code block style [Expected: fenced; Actual: indented] : ```
Billy99 commented 3 months ago

I made some changes to the Chinese translated files. I need someone that can read Chinese to verify my changes. It's mostly spacing and links to other sections, but still needs a look through. Thanks.