Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update preview pictures #289

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 45 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@
[io-doc]: https://cpp-linter.github.io/cpp-linter-action/inputs-outputs
[recipes-doc]: https://cpp-linter.github.io/cpp-linter-action/examples

[format-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-format.png
[tidy-annotations-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/annotations-clang-tidy.png
[thread-comment-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/comment.png
[step-summary-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/step-summary.png
[tidy-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/tidy-review.png
[format-review-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-review.png
[format-suggestion-preview]: https://raw.githubusercontent.com/cpp-linter/cpp-linter-action/main/docs/images/format-suggestion.png

<!--README-start-->
<!-- start -->

# C/C++ Linter Action <sub><sup>| clang-format & clang-tidy</sup></sub>

Expand Down Expand Up @@ -71,49 +63,78 @@ For all explanations of our available input parameters and output variables, see

See also our [example recipes][recipes-doc].

<!-- stop -->
## Example

### Annotations

Using [`file-annotations`][file-annotations]:
Using [`--file-annotations`][file-annotations]:

#### clang-format annotations

![clang-format annotations][format-annotations-preview]
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-annotation-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-annotation-light.png">
<img alt="format-annotation-preview." src="docs/images/format-annotation-light.png">
</picture>

#### clang-tidy annotations

![clang-tidy annotations][tidy-annotations-preview]
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-annotation-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-annotation-light.png">
<img alt="tidy-annotation-preview." src="docs/images/tidy-annotation-light.png">
</picture>

### Thread Comment

Using [`thread-comments`][thread-comments]:
Using [`--thread-comments`][thread-comments]:

![sample thread-comment][thread-comment-preview]
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/thread-comment-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/thread-comment-light.png">
<img alt="thread-comment-preview." src="docs/images/thread-comment-light.png">
</picture>

### Step Summary

Using [`step-summary`][step-summary]:
Using [`--step-summary`][step-summary]:

![step summary][step-summary-preview]
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/step-summary-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/step-summary-light.png">
<img alt="step-summary-preview." src="docs/images/step-summary-light.png">
</picture>

### Pull Request Review

#### Only clang-tidy

Using [`tidy-review`][tidy-review]:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/review-summary-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/review-summary-light.png">
<img alt="review-summary-preview." src="docs/images/review-summary-light.png">
</picture>

![sample tidy-review][tidy-review-preview]
#### clang-tidy suggestion

#### Only clang-format
Using [`--tidy-review`][tidy-review]:

Using [`format-review`][format-review]:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/tidy-review-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/tidy-review-light.png">
<img alt="tidy-review-preview." src="docs/images/tidy-review-light.png">
</picture>

![sample format-review][format-review-preview]
#### clang-format suggestion

![sample format-suggestion][format-suggestion-preview]
Using [`--format-review`][format-review]:

<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/images/format-review-dark.png">
<source media="(prefers-color-scheme: light)" srcset="docs/images/format-review-light.png">
<img alt="format-review-preview." src="docs/images/format-review-light.png">
</picture>

<!-- resume -->
## Add C/C++ Linter Action badge in README

You can show C/C++ Linter Action status with a badge in your repository README
Expand Down
Binary file removed docs/images/annotations-clang-format.png
Binary file not shown.
Binary file removed docs/images/annotations-clang-tidy.png
Binary file not shown.
Binary file removed docs/images/comment.png
Binary file not shown.
Binary file added docs/images/format-annotation-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/format-annotation-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/format-review-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/format-review-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/format-review.png
Binary file not shown.
Binary file removed docs/images/format-suggestion.png
Binary file not shown.
Binary file added docs/images/review-summary-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/review-summary-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/step-summary-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/step-summary-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/step-summary.png
Binary file not shown.
Binary file added docs/images/thread-comment-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/thread-comment-expanded-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/thread-comment-expanded-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/thread-comment-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/tidy-annotation-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/tidy-annotation-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/tidy-review-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/tidy-review-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/tidy-review.png
Binary file not shown.
71 changes: 61 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,67 @@
[io-doc]: inputs-outputs.md
[recipes-doc]: examples/index.md

[format-annotations-preview]: images/annotations-clang-format.png
[tidy-annotations-preview]: images/annotations-clang-tidy.png
[thread-comment-preview]: images/comment.png
[step-summary-preview]: images/step-summary.png
[tidy-review-preview]: images/tidy-review.png
[format-review-preview]: images/format-review.png
[format-suggestion-preview]: images/format-suggestion.png
{%
include "../README.md"
start="<!-- start -->"
end="<!-- stop -->"
%}

## Example

### Annotations

Using [`--file-annotations`][file-annotations]:

#### clang-format annotations

![format-annotation-dark](images/format-annotation-dark.png){ .dark-only }
![format-annotation-light](images/format-annotation-light.png){ .light-only }

#### clang-tidy annotations

![tidy-annotation-dark](images/tidy-annotation-dark.png){ .dark-only }
![tidy-annotation-light](images/tidy-annotation-light.png){ .light-only }

### Thread Comment

Using [`--thread-comments`][thread-comments]:

![thread-comment-dark](images/thread-comment-dark.png){ .dark-only }
![thread-comment-light](images/thread-comment-light.png){ .light-only }

??? example "Expanded"

![thread-comment-expanded-dark](images/thread-comment-expanded-dark.png){ .dark-only }
![thread-comment-expanded-light](images/thread-comment-expanded-light.png){ .light-only }

### Step Summary

Using [`--step-summary`][step-summary]:

![step-summary-dark](images/step-summary-dark.png){ .dark-only }
![step-summary-light](images/step-summary-light.png){ .light-only }

### Pull Request Review

![review-summary-dark](images/review-summary-dark.png){ .dark-only }
![review-summary-light](images/review-summary-light.png){ .light-only }

#### clang-tidy suggestion

Using [`--tidy-review`][tidy-review]:

![tidy-review-dark](images/tidy-review-dark.png){ .dark-only }
![tidy-review-light](images/tidy-review-light.png){ .light-only }

#### clang-format suggestion

Using [`--format-review`][format-review]:

![format-review-dark](images/format-review-dark.png){ .dark-only }
![format-review-light](images/format-review-light.png){ .light-only }

{%
include-markdown "../README.md"
start="<!--README-start-->"
end="<!--README-end-->"
include "../README.md"
start="<!-- resume -->"
%}
18 changes: 16 additions & 2 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@ th {
background-color: var(--md-default-fg-color--lightest);
}

.md-header,
.md-nav--primary .md-nav__title[for="__drawer"] {
[data-md-color-scheme="default"] img.dark-only {
display: none;

}

[data-md-color-scheme="slate"] img.light-only {
display: none;
}

.md-header {
background-color: #4051b5;
}

@media screen and (max-width: 76.2344em) {
.md-nav--primary .md-nav__title[for="__drawer"] {
background-color: #4051b5;
}
}

@keyframes heart {

0%,
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ markdown_extensions:
- pymdownx.highlight:
linenums_style: pymdownx-inline
- pymdownx.inlinehilite
- pymdownx.details
- pymdownx.snippets:
check_paths: true
- attr_list
Expand Down
Loading