File tree Expand file tree Collapse file tree 5 files changed +49
-1
lines changed Expand file tree Collapse file tree 5 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 4141 uses: getcodelimit/codelimit-action@v1
4242` ` `
4343
44+ # ## Status badge
45+
46+ A status badge is stored after each run in the `_codelimit_reports` branch of
47+ the repository.
48+
49+ To get the Markdown for the badge run the CodeLimit CLI in a local checkout of
50+ the repository, for example :
51+
52+ ` ` ` shell
53+
54+ $ codelimit badge
55+ [](https://github.com/getcodelimit/codelimit/blob/_codelimit_repor
57+ ts/main/codelimit.md)
58+
59+ ✔ Badge Markdown copied to clipboard!
60+ ` ` `
61+
62+ # ### Meaning of the badge
63+
64+ If a repository contains functions that *exceed 60 lines of code*, the badge
65+ will show :
66+
67+ <div align="center">
68+ <img src="../../../assets/badge-needs-refactoring.svg" alt="Badge needs refactoring" class="off-glb">
69+ </div>
70+
71+ If a repository contains *no functions that exceed 30 lines of code*, the badge
72+ will show :
73+
74+ <div align="center">
75+ <img src="../../../assets/badge-100.svg" alt="Badge needs refactoring" class="off-glb">
76+ </div>
77+
78+ Otherwise, the badge will show the percentage of code that does not exceed 30
79+ lines of code.
80+
81+ If that percentage is 80% or higher, the badge will be green :
82+
83+ <div align="center">
84+ <img src="../../../assets/badge-88.svg" alt="Badge needs refactoring" class="off-glb">
85+ </div>
86+
87+ If that percentage is below 80%, the badge will be orange.
88+
4489# # Pre-commit hook
4590
4691CodeLimit can be installed as a [pre-commit](https://pre-commit.com/) hook so
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ markdown_extensions:
3838 - pymdownx.snippets
3939nav :
4040 - CodeLimit : ' index.md'
41- - ' why-function-length.md'
4241 - Getting Started :
4342 - ' getting-started/development-workflow.md'
4443 - ' getting-started/standalone-usage.md'
4544 - ' configuration.md'
45+ - ' why-function-length.md'
4646 - ' faq.md'
4747 - ' development.md'
You can’t perform that action at this time.
0 commit comments