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