|
7 | 7 | [io-doc]: https://cpp-linter.github.io/cpp-linter-action/inputs-outputs |
8 | 8 | [recipes-doc]: https://cpp-linter.github.io/cpp-linter-action/examples |
9 | 9 |
|
10 | | -[format-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-format.png |
11 | | -[tidy-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-tidy.png |
12 | | -[thread-comment-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/comment.png |
13 | | -[step-summary-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/step-summary.png |
14 | | -[tidy-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/tidy-review.png |
15 | | -[format-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-review.png |
16 | | -[format-suggestion-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-suggestion.png |
17 | | - |
18 | | -<!--README-start--> |
| 10 | +<!-- start --> |
19 | 11 |
|
20 | 12 | # C/C++ Linter Action <sub><sup>| clang-format & clang-tidy</sup></sub> |
21 | 13 |
|
@@ -104,48 +96,78 @@ See also our [example recipes][recipes-doc]. |
104 | 96 | <strong> and <a href="https://github.com/cpp-linter/cpp-linter-action/network/dependents">many more</a>.</strong> |
105 | 97 | </p> |
106 | 98 |
|
| 99 | +<!-- stop --> |
107 | 100 | ## Example |
108 | 101 |
|
109 | 102 | ### Annotations |
110 | 103 |
|
111 | | -Using [`file-annotations`][file-annotations]: |
| 104 | +Using [`--file-annotations`][file-annotations]: |
112 | 105 |
|
113 | 106 | #### clang-format annotations |
114 | 107 |
|
115 | | -![clang-format annotations][format-annotations-preview] |
| 108 | +<picture> |
| 109 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/format-annotation-dark.png"> |
| 110 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/format-annotation-light.png"> |
| 111 | + <img alt="format-annotation-preview." src="docs/images/format-annotation-light.png"> |
| 112 | +</picture> |
116 | 113 |
|
117 | 114 | #### clang-tidy annotations |
118 | 115 |
|
119 | | -![clang-tidy annotations][tidy-annotations-preview] |
| 116 | +<picture> |
| 117 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-annotation-dark.png"> |
| 118 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-annotation-light.png"> |
| 119 | + <img alt="tidy-annotation-preview." src="docs/images/tidy-annotation-light.png"> |
| 120 | +</picture> |
120 | 121 |
|
121 | 122 | ### Thread Comment |
122 | 123 |
|
123 | | -Using [`thread-comments`][thread-comments]: |
| 124 | +Using [`--thread-comments`][thread-comments]: |
124 | 125 |
|
125 | | -![sample thread-comment][thread-comment-preview] |
| 126 | +<picture> |
| 127 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png"> |
| 128 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png"> |
| 129 | + <img alt="thread-comment-preview." src="docs/images/thread-comment-light.png"> |
| 130 | +</picture> |
126 | 131 |
|
127 | 132 | ### Step Summary |
128 | 133 |
|
129 | | -Using [`step-summary`][step-summary]: |
| 134 | +Using [`--step-summary`][step-summary]: |
130 | 135 |
|
131 | | -![step summary][step-summary-preview] |
| 136 | +<picture> |
| 137 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png"> |
| 138 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png"> |
| 139 | + <img alt="step-summary-preview." src="docs/images/step-summary-light.png"> |
| 140 | +</picture> |
132 | 141 |
|
133 | 142 | ### Pull Request Review |
134 | 143 |
|
135 | | -#### Only clang-tidy |
| 144 | +<picture> |
| 145 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/review-summary-dark.png"> |
| 146 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/review-summary-light.png"> |
| 147 | + <img alt="review-summary-preview." src="docs/images/review-summary-light.png"> |
| 148 | +</picture> |
136 | 149 |
|
137 | | -Using [`tidy-review`][tidy-review]: |
| 150 | +#### clang-tidy suggestion |
138 | 151 |
|
139 | | -![sample tidy-review][tidy-review-preview] |
| 152 | +Using [`--tidy-review`][tidy-review]: |
140 | 153 |
|
141 | | -#### Only clang-format |
| 154 | +<picture> |
| 155 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png"> |
| 156 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png"> |
| 157 | + <img alt="tidy-review-preview." src="docs/images/tidy-review-light.png"> |
| 158 | +</picture> |
142 | 159 |
|
143 | | -Using [`format-review`][format-review]: |
| 160 | +#### clang-format suggestion |
144 | 161 |
|
145 | | -![sample format-review][format-review-preview] |
| 162 | +Using [`--format-review`][format-review]: |
146 | 163 |
|
147 | | -![sample format-suggestion][format-suggestion-preview] |
| 164 | +<picture> |
| 165 | + <source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png"> |
| 166 | + <source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png"> |
| 167 | + <img alt="format-review-preview." src="docs/images/format-review-light.png"> |
| 168 | +</picture> |
148 | 169 |
|
| 170 | +<!-- resume --> |
149 | 171 | ## Add C/C++ Linter Action badge in README |
150 | 172 |
|
151 | 173 | You can show C/C++ Linter Action status with a badge in your repository README |
|
0 commit comments