-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Introduce mermaid sequence #21
Conversation
WalkthroughThe recent updates bring significant enhancements to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | main (e758807) | #21 (bc2088e) | +/- |
|---------------------|----------------|---------------|-------|
+ | Coverage | 90.5% | 91.4% | +1.0% |
| Files | 5 | 11 | +6 |
| Lines | 210 | 315 | +105 |
+ | Covered | 190 | 288 | +98 |
+ | Test Execution Time | 10s | 1s | -9s | Code coverage of files in pull request scope (0.0% → 93.3%)
Reported by octocov |
SyncResponse("David", "Sophia", "wake up, wake up"). | ||
String() | ||
|
||
md.NewMarkdown(os.Stdout). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
G104: Errors unhandled. (gosec)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
Files selected for processing (16)
- README.md (4 hunks)
- doc/sequence/generated.md (1 hunks)
- doc/sequence/main.go (1 hunks)
- examples_test.go (2 hunks)
- mermaid/sequence/activation.go (1 hunks)
- mermaid/sequence/activation_test.go (1 hunks)
- mermaid/sequence/config.go (1 hunks)
- mermaid/sequence/config_test.go (1 hunks)
- mermaid/sequence/directive.go (1 hunks)
- mermaid/sequence/directive_test.go (1 hunks)
- mermaid/sequence/note.go (1 hunks)
- mermaid/sequence/note_test.go (1 hunks)
- mermaid/sequence/sequence.go (1 hunks)
- mermaid/sequence/sequence_test.go (1 hunks)
- mermaid/sequence/statement.go (1 hunks)
- mermaid/sequence/statement_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (14)
- doc/sequence/main.go
- examples_test.go
- mermaid/sequence/activation.go
- mermaid/sequence/activation_test.go
- mermaid/sequence/config.go
- mermaid/sequence/config_test.go
- mermaid/sequence/directive.go
- mermaid/sequence/directive_test.go
- mermaid/sequence/note.go
- mermaid/sequence/note_test.go
- mermaid/sequence/sequence.go
- mermaid/sequence/sequence_test.go
- mermaid/sequence/statement.go
- mermaid/sequence/statement_test.go
Additional Context Used
LanguageTool (25)
README.md (23)
Near line 4: Possible spelling mistake found.
Context: ...pkg.go.dev/github.com/nao1215/markdown) [![MultiPlatformUnitTest](https://github.com/nao1215/markdown/ac...
Near line 5: Possible spelling mistake found.
Context: ...rkdown/actions/workflows/unit_test.yml) [![reviewdog](https://github.com/nao1215/markdown/ac...
Near line 6: Possible spelling mistake found.
Context: ...rkdown/actions/workflows/reviewdog.yml) [![Gosec](https://github.com/nao1215/markdown/ac...
Near line 10: Possible spelling mistake found.
Context: ...arkdown is a simple markdown builder in golang. The markdown package assembles Markdow...
Near line 12: Possible spelling mistake found.
Context: ...eloped to save test results in nao1215/spectest. ...
Near line 12: Possible spelling mistake found.
Context: ...age implements the features required by spectest. For example, the markdown package supp...
Near line 12: Possible spelling mistake found.
Context: ...ams**, which was a necessary feature in spectest. Additionally, complex code that inc...
Near line 29: Possible spelling mistake found.
Context: ...x] Text formatting; bold, italic, code, strikethrough, bold italic - [x] Text with link - [x]...
Near line 38: Only proper nouns start with an uppercase character (there are exceptions for headlines).
Context: ... ### Features not in Markdown syntax - Generate badges; RedBadge(), YellowBadge(), Gree...
Near line 144: This sentence does not start with an uppercase letter.
Context: ... please refer to the following link. - sample.md ### Ge...
Near line 147: Don’t put a space before the full stop.
Context: ...e to generate Markdown first. Then, run"go generate ./..."
to generate Markdown. [Code exam...
Near line 186: Unpaired symbol: ‘]’ seems to be missing
Context: ...wn. This syntax is supported by GitHub. Code example: ```g...
Near line 220: Please check whether ‘not’ might be the correct word here instead of ‘note’.
Context: ...l look like this; > [!NOTE] > This is note > [!TIP] > This is tip > [!IMPO...
Near line 223: Consider using either the past participle “tipped” or the present participle “tipping” here.
Context: ... > This is note > [!TIP] > This is tip > [!IMPORTANT] > This is important...
Near line 235: Unpaired symbol: ‘]’ seems to be missing
Context: ...e red, yellow, and green status badges. Code example: ```g...
Near line 260: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...id sequence diagram Generate mermaid in markdown. You can generate mermaid using go gene...
Near line 260: Don’t put a space before the full stop.
Context: ...te Mermaid first. Then, run "go generate ./..." to generate it. ```go package mai...
Near line 302: Unpaired symbol: ‘]’ seems to be missing
Context: ...m). Build() } ``` Plain text output: [markdown is here](./doc/sequence/generat...
Near line 352: Possible spelling mistake found.
Context: ...Markdown documents produced by nao1215/spectest. ...
Near line 372: Possible spelling mistake found.
Context: ...o all markdown files located within the testdata directory. ```go if err := GenerateI...
Near line 414: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...e, GitHub Star motivates me to develop! Please feel free to contribute to this project. [![Star Hi...
Near line 419: It seems that a comma is missing.
Context: ...215/markdown&Date) ### Contributors ✨ Thanks goes to these wonderful people ([emoji ...
Near line 449: Using many exclamation marks might seem excessive (in this case: 12 exclamation marks for a text that’s 4740 characters long)
Context: ...ation. Contributions of any kind welcome!doc/sequence/generated.md (2)
Near line 1: Posibleng may nahanap na mali sa ispeling
Context: ## Sequence Diagram ```mermaid sequenceDiagram ...
Near line 1: Posibleng may nahanap na mali sa ispeling
Context: ## Sequence Diagram ```mermaid sequenceDiagram particip...
@@ -0,0 +1,21 @@ | |||
## Sequence Diagram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the spelling error in the heading.
- ## Sequence Diagram
+ ## Sequence Diagram
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
## Sequence Diagram | |
## Sequence Diagram |
Add a blank line after the heading for proper Markdown formatting.
## Sequence Diagram
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
## Sequence Diagram | |
## Sequence Diagram | |
@@ -0,0 +1,21 @@ | |||
## Sequence Diagram | |||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the fenced code block is surrounded by blank lines for proper Markdown formatting.
## Sequence Diagram
+
```mermaid
3~
end | ||
|
||
David-->>Sophia: wake up, wake up | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files should end with a single newline character to conform to POSIX standards.
21~
<!-- This is an auto-generated comment by CodeRabbit -->
@@ -7,15 +7,15 @@ | |||
[![Gosec](https://github.com/nao1215/markdown/actions/workflows/gosec.yml/badge.svg)](https://github.com/nao1215/markdown/actions/workflows/gosec.yml) | |||
![Coverage](https://raw.githubusercontent.com/nao1215/octocovs-central-repo/main/badges/nao1215/markdown/coverage.svg) | |||
# What is markdown package | |||
The Package markdown is a simple markdown builder in golang. This library assembles Markdown using method chaining, not uses a template engine like [html/template](https://pkg.go.dev/html/template). The syntax of Markdown follows GitHub Markdown. | |||
The Package markdown is a simple markdown builder in golang. The markdown package assembles Markdown using method chaining, not uses a template engine like [html/template](https://pkg.go.dev/html/template). The syntax of Markdown follows **GitHub Markdown**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the spelling error in the description.
- The Package markdown is a simple markdown builder in golang.
+ The markdown package is a simple markdown builder in Golang.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
The Package markdown is a simple markdown builder in golang. The markdown package assembles Markdown using method chaining, not uses a template engine like [html/template](https://pkg.go.dev/html/template). The syntax of Markdown follows **GitHub Markdown**. | |
The markdown package is a simple markdown builder in Golang. The markdown package assembles Markdown using method chaining, not uses a template engine like [html/template](https://pkg.go.dev/html/template). The syntax of Markdown follows **GitHub Markdown**. |
|
||
This library was initially developed to display test results in [nao1215/spectest](https://github.com/nao1215/spectest). Therefore, it implements the features required by spectest, but there are no plans to add additional functionalities unless requested by someone. | ||
The markdown package was initially developed to save test results in [nao1215/spectest](https://github.com/nao1215/spectest). Therefore, the markdown package implements the features required by spectest. For example, the markdown package supports **mermaid sequence diagrams**, which was a necessary feature in spectest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify the sentence to improve readability.
- The markdown package was initially developed to save test results in [nao1215/spectest](https://github.com/nao1215/spectest).
+ The markdown package was initially developed to document test results for [nao1215/spectest](https://github.com/nao1215/spectest).
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
The markdown package was initially developed to save test results in [nao1215/spectest](https://github.com/nao1215/spectest). Therefore, the markdown package implements the features required by spectest. For example, the markdown package supports **mermaid sequence diagrams**, which was a necessary feature in spectest. | |
The markdown package was initially developed to document test results for [nao1215/spectest](https://github.com/nao1215/spectest). Therefore, the markdown package implements the features required by spectest. For example, the markdown package supports **mermaid sequence diagrams**, which was a necessary feature in spectest. |
@@ -32,6 +32,7 @@ Additionally, complex code that increases the complexity of the library, such as | |||
- [x] Plain text | |||
- [x] Details | |||
- [x] Alerts; NOTE, TIP, IMPORTANT, CAUTION, WARNING | |||
- [x] mermaid (only support sequence diagram) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify that the support for Mermaid diagrams is limited to sequence diagrams.
- - [x] mermaid (only support sequence diagram)
+ - [x] Mermaid diagrams (currently, only sequence diagrams are supported)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- [x] mermaid (only support sequence diagram) | |
- [x] Mermaid diagrams (currently, only sequence diagrams are supported) |
@@ -142,6 +143,45 @@ func main() { | |||
If you want to see how it looks in Markdown, please refer to the following link. | |||
- [sample.md](./doc/generated_example.md) | |||
|
|||
### Generate Markdown using `"go generate ./..."` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line after the heading for proper Markdown formatting.
### Generate Markdown using `"go generate ./..."`
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Generate Markdown using `"go generate ./..."` | |
### Generate Markdown using `"go generate ./..."` | |
@@ -216,45 +256,98 @@ Your badge will look like this; | |||
![Badge](https://img.shields.io/badge/yellow_badge-yellow) | |||
![Badge](https://img.shields.io/badge/green_badge-green) | |||
|
|||
### Generate Markdown using `"go generate ./..."` | |||
You can generate Markdown using `go generate`. Please define code to generate Markdown first. Then, run `"go generate ./..."` to generate Markdown. | |||
### Generate mermaid sequence diagram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify the description to improve understanding.
- Generate mermaid in markdown. You can generate mermaid using go generate.
+ Generate Mermaid diagrams in Markdown using the `go generate` command.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Generate mermaid sequence diagram | |
### Generate Mermaid diagrams in Markdown using the `go generate` command. |
Summary by CodeRabbit
New Features
Documentation
generated.md
file showcasing a sequence diagram example.Bug Fixes
Tests