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

feat: Add mockstorage implementation #1405

Merged
merged 10 commits into from
Jun 6, 2024
Merged

feat: Add mockstorage implementation #1405

merged 10 commits into from
Jun 6, 2024

Conversation

sixcolors
Copy link
Member

@sixcolors sixcolors commented Jun 3, 2024

This pull request adds a new mockstorage implementation for Fiber. The mockstorage is not persistent and is only used for testing purposes. It includes the necessary code changes and tests.

Summary by CodeRabbit

  • New Features

    • Introduced a mock storage implementation for the Fiber framework, allowing users to test storage operations with custom functions.
    • Added configuration options for the mock storage, including default settings and custom function handling.
    • Updated README to include information about the new MockStorage option.
  • Tests

    • Added comprehensive test cases for various storage operations and custom behaviors in the mock storage implementation.
  • Documentation

    • Updated documentation to include details about the mock storage implementation and its usage.

@sixcolors sixcolors requested a review from a team as a code owner June 3, 2024 18:23
@sixcolors sixcolors requested review from gaby, ReneWerner87 and efectn and removed request for a team June 3, 2024 18:23
Copy link
Contributor

coderabbitai bot commented Jun 3, 2024

Walkthrough

The recent updates introduce a new mock storage implementation for testing purposes in a Go-based project. This includes GitHub Actions workflows for testing and release management, Dependabot configuration for dependency updates, and comprehensive documentation and test cases for the new mock storage module. The changes enhance the project's testing capabilities and streamline the management of dependencies and release processes.

Changes

Files/Paths Change Summary
.github/workflows/test-mockstorage.yml Added a workflow for testing local storage functionality.
.github/dependabot.yml Added a Dependabot configuration for the gomod package ecosystem with a daily update schedule.
.github/workflows/release-drafter-mockstorage.yml Added a workflow for the Release Drafter tool specific to the MockStorage component.
README.md Added an entry for MockStorage in the list of storage options with corresponding test badge links.
mockstorage/README.md Introduced a mock storage implementation for Fiber, designed for testing purposes.
mockstorage/mockstorage.go Introduced a mock storage adapter with configurable custom functions for testing purposes.
mockstorage/mockstorage_test.go Added test cases for various storage operations and custom behaviors in the mock storage implementation.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant Developer
    participant GitHubActions
    participant Dependabot
    participant MockStorage

    Developer->>GitHubActions: Push changes to repository
    GitHubActions-->>MockStorage: Run tests on mockstorage
    GitHubActions-->>MockStorage: Draft release for mockstorage
    Dependabot-->>MockStorage: Update dependencies daily
    MockStorage-->>Developer: Provide feedback on tests and releases
Loading

Poem

In the land of code, where rabbits roam,
A mock storage was built, a testing home.
With workflows and tests, all neatly aligned,
Dependencies updated, releases defined.
Now our code hops with joy, robust and free,
A testament to teamwork, for all to see.
🌟🐰✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 442c85f and 2ce70bc.

Files ignored due to path filters (2)
  • mockstorage/go.mod is excluded by !**/*.mod, !**/*.mod
  • mockstorage/go.sum is excluded by !**/*.sum, !**/*.sum
Files selected for processing (4)
  • .github/workflows/test-mockstorage.yml (1 hunks)
  • mockstorage/README.md (1 hunks)
  • mockstorage/mockstorage.go (1 hunks)
  • mockstorage/mockstorage_test.go (1 hunks)
Additional context used
LanguageTool
mockstorage/README.md

[style] ~7-~7: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1050 characters long)
Context: ...ag/gofiber/storage?filter=mockstorage*) Discord Test ![Security](https://img.shields.io/github...

Markdownlint
mockstorage/README.md

62-62: Column: 1
Hard tabs


63-63: Column: 1
Hard tabs


64-64: Column: 1
Hard tabs


65-65: Column: 1
Hard tabs


66-66: Column: 1
Hard tabs


67-67: Column: 1
Hard tabs


68-68: Column: 1
Hard tabs


69-69: Column: 1
Hard tabs


70-70: Column: 1
Hard tabs


71-71: Column: 1
Hard tabs


72-72: Column: 1
Hard tabs


73-73: Column: 1
Hard tabs


74-74: Column: 1
Hard tabs


75-75: Column: 1
Hard tabs


76-76: Column: 1
Hard tabs


77-77: Column: 1
Hard tabs


78-78: Column: 1
Hard tabs


79-79: Column: 1
Hard tabs


80-80: Column: 1
Hard tabs


81-81: Column: 1
Hard tabs


82-82: Column: 1
Hard tabs


83-83: Column: 1
Hard tabs


84-84: Column: 1
Hard tabs


89-89: Column: 1
Hard tabs


90-90: Column: 1
Hard tabs


91-91: Column: 1
Hard tabs


92-92: Column: 1
Hard tabs


93-93: Column: 1
Hard tabs


94-94: Column: 1
Hard tabs


95-95: Column: 1
Hard tabs


96-96: Column: 1
Hard tabs


97-97: Column: 1
Hard tabs


98-98: Column: 1
Hard tabs


99-99: Column: 1
Hard tabs


100-100: Column: 1
Hard tabs


101-101: Column: 1
Hard tabs


102-102: Column: 1
Hard tabs


103-103: Column: 1
Hard tabs


104-104: Column: 1
Hard tabs


105-105: Column: 1
Hard tabs


106-106: Column: 1
Hard tabs


107-107: Column: 1
Hard tabs


114-114: Column: 1
Hard tabs


121-121: Column: 1
Hard tabs


122-122: Column: 1
Hard tabs


123-123: Column: 1
Hard tabs


124-124: Column: 1
Hard tabs


125-125: Column: 1
Hard tabs


126-126: Column: 1
Hard tabs


127-127: Column: 1
Hard tabs


128-128: Column: 1
Hard tabs


129-129: Column: 1
Hard tabs


24-24: Expected: 1; Actual: 2
Multiple consecutive blank lines


17-17: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


25-25: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


39-39: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


49-49: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


111-111: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


118-118: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


26-26: null
Fenced code blocks should be surrounded by blank lines


41-41: null
Fenced code blocks should be surrounded by blank lines


43-43: null
Fenced code blocks should be surrounded by blank lines


45-45: null
Fenced code blocks should be surrounded by blank lines


51-51: null
Fenced code blocks should be surrounded by blank lines


56-56: null
Fenced code blocks should be surrounded by blank lines


112-112: null
Fenced code blocks should be surrounded by blank lines


119-119: null
Fenced code blocks should be surrounded by blank lines


18-18: null
Lists should be surrounded by blank lines


15-15: null
Emphasis used instead of a heading

golangci-lint
mockstorage/mockstorage_test.go

11-11: undefined: New


68-68: undefined: New


70-70: undefined: CustomFuncs


71-71: undefined: entry


72-72: undefined: entry


83-83: undefined: entry


96-96: undefined: New


98-98: undefined: CustomFuncs


115-115: undefined: CustomFuncs

Additional comments not posted (4)
.github/workflows/test-mockstorage.yml (1)

1-28: The GitHub Actions workflow is well-configured for testing the mockstorage package across multiple Go versions.

mockstorage/README.md (1)

1-131: The README is comprehensive and well-detailed, providing clear instructions and examples for using the mockstorage package.

Tools
LanguageTool

[style] ~7-~7: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1050 characters long)
Context: ...ag/gofiber/storage?filter=mockstorage*) Discord Test ![Security](https://img.shields.io/github...

Markdownlint

62-62: Column: 1
Hard tabs


63-63: Column: 1
Hard tabs


64-64: Column: 1
Hard tabs


65-65: Column: 1
Hard tabs


66-66: Column: 1
Hard tabs


67-67: Column: 1
Hard tabs


68-68: Column: 1
Hard tabs


69-69: Column: 1
Hard tabs


70-70: Column: 1
Hard tabs


71-71: Column: 1
Hard tabs


72-72: Column: 1
Hard tabs


73-73: Column: 1
Hard tabs


74-74: Column: 1
Hard tabs


75-75: Column: 1
Hard tabs


76-76: Column: 1
Hard tabs


77-77: Column: 1
Hard tabs


78-78: Column: 1
Hard tabs


79-79: Column: 1
Hard tabs


80-80: Column: 1
Hard tabs


81-81: Column: 1
Hard tabs


82-82: Column: 1
Hard tabs


83-83: Column: 1
Hard tabs


84-84: Column: 1
Hard tabs


89-89: Column: 1
Hard tabs


90-90: Column: 1
Hard tabs


91-91: Column: 1
Hard tabs


92-92: Column: 1
Hard tabs


93-93: Column: 1
Hard tabs


94-94: Column: 1
Hard tabs


95-95: Column: 1
Hard tabs


96-96: Column: 1
Hard tabs


97-97: Column: 1
Hard tabs


98-98: Column: 1
Hard tabs


99-99: Column: 1
Hard tabs


100-100: Column: 1
Hard tabs


101-101: Column: 1
Hard tabs


102-102: Column: 1
Hard tabs


103-103: Column: 1
Hard tabs


104-104: Column: 1
Hard tabs


105-105: Column: 1
Hard tabs


106-106: Column: 1
Hard tabs


107-107: Column: 1
Hard tabs


114-114: Column: 1
Hard tabs


121-121: Column: 1
Hard tabs


122-122: Column: 1
Hard tabs


123-123: Column: 1
Hard tabs


124-124: Column: 1
Hard tabs


125-125: Column: 1
Hard tabs


126-126: Column: 1
Hard tabs


127-127: Column: 1
Hard tabs


128-128: Column: 1
Hard tabs


129-129: Column: 1
Hard tabs


24-24: Expected: 1; Actual: 2
Multiple consecutive blank lines


17-17: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


25-25: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


39-39: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


49-49: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


111-111: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


118-118: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


26-26: null
Fenced code blocks should be surrounded by blank lines


41-41: null
Fenced code blocks should be surrounded by blank lines


43-43: null
Fenced code blocks should be surrounded by blank lines


45-45: null
Fenced code blocks should be surrounded by blank lines


51-51: null
Fenced code blocks should be surrounded by blank lines


56-56: null
Fenced code blocks should be surrounded by blank lines


112-112: null
Fenced code blocks should be surrounded by blank lines


119-119: null
Fenced code blocks should be surrounded by blank lines


18-18: null
Lists should be surrounded by blank lines


15-15: null
Emphasis used instead of a heading

mockstorage/mockstorage.go (1)

1-170: The implementation in mockstorage.go is robust, correctly handling custom function injections and standard storage operations.

mockstorage/mockstorage_test.go (1)

1-276: The test suite in mockstorage_test.go is thorough, covering both default and custom behaviors of the storage system.

Tools
golangci-lint

11-11: undefined: New


68-68: undefined: New


70-70: undefined: CustomFuncs


71-71: undefined: entry


72-72: undefined: entry


83-83: undefined: entry


96-96: undefined: New


98-98: undefined: CustomFuncs


115-115: undefined: CustomFuncs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2ce70bc and 024059f.

Files selected for processing (1)
  • mockstorage/README.md (1 hunks)
Additional context used
LanguageTool
mockstorage/README.md

[style] ~7-~7: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1050 characters long)
Context: ...ag/gofiber/storage?filter=mockstorage*) Discord Test ![Security](https://img.shields.io/github...

Markdownlint
mockstorage/README.md

62-62: Column: 1
Hard tabs


63-63: Column: 1
Hard tabs


64-64: Column: 1
Hard tabs


65-65: Column: 1
Hard tabs


66-66: Column: 1
Hard tabs


67-67: Column: 1
Hard tabs


68-68: Column: 1
Hard tabs


69-69: Column: 1
Hard tabs


70-70: Column: 1
Hard tabs


71-71: Column: 1
Hard tabs


72-72: Column: 1
Hard tabs


73-73: Column: 1
Hard tabs


74-74: Column: 1
Hard tabs


75-75: Column: 1
Hard tabs


76-76: Column: 1
Hard tabs


77-77: Column: 1
Hard tabs


78-78: Column: 1
Hard tabs


79-79: Column: 1
Hard tabs


80-80: Column: 1
Hard tabs


81-81: Column: 1
Hard tabs


82-82: Column: 1
Hard tabs


83-83: Column: 1
Hard tabs


84-84: Column: 1
Hard tabs


89-89: Column: 1
Hard tabs


90-90: Column: 1
Hard tabs


91-91: Column: 1
Hard tabs


92-92: Column: 1
Hard tabs


93-93: Column: 1
Hard tabs


94-94: Column: 1
Hard tabs


95-95: Column: 1
Hard tabs


96-96: Column: 1
Hard tabs


97-97: Column: 1
Hard tabs


98-98: Column: 1
Hard tabs


99-99: Column: 1
Hard tabs


100-100: Column: 1
Hard tabs


101-101: Column: 1
Hard tabs


102-102: Column: 1
Hard tabs


103-103: Column: 1
Hard tabs


104-104: Column: 1
Hard tabs


105-105: Column: 1
Hard tabs


106-106: Column: 1
Hard tabs


107-107: Column: 1
Hard tabs


114-114: Column: 1
Hard tabs


121-121: Column: 1
Hard tabs


122-122: Column: 1
Hard tabs


123-123: Column: 1
Hard tabs


124-124: Column: 1
Hard tabs


125-125: Column: 1
Hard tabs


126-126: Column: 1
Hard tabs


127-127: Column: 1
Hard tabs


128-128: Column: 1
Hard tabs


129-129: Column: 1
Hard tabs


24-24: Expected: 1; Actual: 2
Multiple consecutive blank lines


17-17: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


25-25: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


39-39: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


49-49: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


111-111: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


118-118: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


26-26: null
Fenced code blocks should be surrounded by blank lines


41-41: null
Fenced code blocks should be surrounded by blank lines


43-43: null
Fenced code blocks should be surrounded by blank lines


45-45: null
Fenced code blocks should be surrounded by blank lines


51-51: null
Fenced code blocks should be surrounded by blank lines


56-56: null
Fenced code blocks should be surrounded by blank lines


112-112: null
Fenced code blocks should be surrounded by blank lines


119-119: null
Fenced code blocks should be surrounded by blank lines


18-18: null
Lists should be surrounded by blank lines


15-15: null
Emphasis used instead of a heading

Additional comments not posted (3)
mockstorage/README.md (3)

26-37: Update the documentation to reflect the new function signatures and the addition of SetCustomFuncs.

The documentation correctly reflects the new API changes, ensuring users are aware of how to utilize the new functionalities.

Tools
Markdownlint

26-26: null
Fenced code blocks should be surrounded by blank lines


113-130: Validate the Config struct and ConfigDefault variable.

The documentation provides clear information on the structure and default values of the Config struct, which is crucial for users to understand how to configure the mockstorage.

Tools
Markdownlint

114-114: Column: 1
Hard tabs


121-121: Column: 1
Hard tabs


122-122: Column: 1
Hard tabs


123-123: Column: 1
Hard tabs


124-124: Column: 1
Hard tabs


125-125: Column: 1
Hard tabs


126-126: Column: 1
Hard tabs


127-127: Column: 1
Hard tabs


128-128: Column: 1
Hard tabs


129-129: Column: 1
Hard tabs


118-118: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


119-119: null
Fenced code blocks should be surrounded by blank lines


57-85: Ensure example code is clear and functional.

The example code provided in the README should be tested to ensure it runs without errors, especially since it introduces custom configurations and function setups.

Also applies to: 88-108

Tools
Markdownlint

62-62: Column: 1
Hard tabs


63-63: Column: 1
Hard tabs


64-64: Column: 1
Hard tabs


65-65: Column: 1
Hard tabs


66-66: Column: 1
Hard tabs


67-67: Column: 1
Hard tabs


68-68: Column: 1
Hard tabs


69-69: Column: 1
Hard tabs


70-70: Column: 1
Hard tabs


71-71: Column: 1
Hard tabs


72-72: Column: 1
Hard tabs


73-73: Column: 1
Hard tabs


74-74: Column: 1
Hard tabs


75-75: Column: 1
Hard tabs


76-76: Column: 1
Hard tabs


77-77: Column: 1
Hard tabs


78-78: Column: 1
Hard tabs


79-79: Column: 1
Hard tabs


80-80: Column: 1
Hard tabs


81-81: Column: 1
Hard tabs


82-82: Column: 1
Hard tabs


83-83: Column: 1
Hard tabs


84-84: Column: 1
Hard tabs

Copy link
Member

@ReneWerner87 ReneWerner87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add release-drafter workflow
  • add dependabot part in config

everything else LGTM

@gaby
Copy link
Member

gaby commented Jun 4, 2024

@sixcolors Whats the difference with https://github.com/gofiber/storage/tree/main/memory they both use the same underlay structure.

@sixcolors
Copy link
Member Author

sixcolors commented Jun 4, 2024

@sixcolors Whats the difference with https://github.com/gofiber/storage/tree/main/memory they both use the same underlay structure.

The mock storage implementation in the gofiber/storage/memory package and the new mock storage introduced in this pull request share a similar underlying structure, but there are some differences to consider:

  1. Purpose:
  • gofiber/storage/memory: The existing memory storage is a general-purpose in-memory storage solution for Fiber. It’s designed to be lightweight and efficient, suitable for most use cases.
  • New Mock Storage: The new mock storage is specifically tailored for testing purposes. It’s not persistent and is meant to facilitate unit tests and other testing scenarios.
  1. Customization:
  • gofiber/storage/memory: The existing memory storage doesn’t offer custom function implementations. It provides a straightforward API for basic storage operations.
  • New Mock Storage: The mock storage allows you to define custom behaviors for various storage operations. This flexibility is valuable during testing, where you might want to simulate specific edge cases or scenarios.

In summary, while both implementations serve storage needs, the new mock storage is purpose-built for testing, offering customizability and isolation. Depending on your use case—whether it’s production code or testing—you can choose the one that best fits your requirements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 024059f and 800262d.

Files selected for processing (2)
  • .github/dependabot.yml (1 hunks)
  • .github/release-drafter-mockstorage.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/release-drafter-mockstorage.yml
Additional comments not posted (1)
.github/dependabot.yml (1)

83-88: Dependabot configuration for /mockstorage/ is correctly set up for daily updates.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 800262d and f088e43.

Files selected for processing (1)
  • .github/dependabot.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/dependabot.yml

@ReneWerner87
Copy link
Member

@sixcolors don´t forget to add the workflow for the config
like this
https://github.com/gofiber/storage/blob/main/.github/workflows/release-drafter-arangodb.yml

@ReneWerner87
Copy link
Member

@gaby ok with the PR ?

Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Outside diff range and nitpick comments (3)
mockstorage/README.md (1)

24-24: Ensure proper spacing around headings and lists.

Adding blank lines around headings and lists will improve the readability and structure of the document.

Also applies to: 17-17, 54-54, 84-84, 94-94, 151-151, 158-158

Tools
Markdownlint

24-24: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

README.md (2)

Line range hint 29-76: Replace hard tabs with spaces in the code snippet.

-   <hard tabs>
+   <spaces>

Using spaces for indentation in code snippets within Markdown files ensures consistency and prevents formatting issues across different platforms.

Tools
Markdownlint

62-62: null (MD045, no-alt-text)
Images should have alternate text (alt text)


63-63: null (MD045, no-alt-text)
Images should have alternate text (alt text)


64-64: null (MD045, no-alt-text)
Images should have alternate text (alt text)


65-65: null (MD045, no-alt-text)
Images should have alternate text (alt text)


66-66: null (MD045, no-alt-text)
Images should have alternate text (alt text)


67-67: null (MD045, no-alt-text)
Images should have alternate text (alt text)


68-68: null (MD045, no-alt-text)
Images should have alternate text (alt text)


Line range hint 13-76: Add alt text to images for better accessibility.

- <img src="url" />
+ <img src="url" alt="Description" />

Providing alternate text for images improves accessibility and SEO, and is a best practice for web content.

Tools
Markdownlint

62-62: null (MD045, no-alt-text)
Images should have alternate text (alt text)


63-63: null (MD045, no-alt-text)
Images should have alternate text (alt text)


64-64: null (MD045, no-alt-text)
Images should have alternate text (alt text)


65-65: null (MD045, no-alt-text)
Images should have alternate text (alt text)


66-66: null (MD045, no-alt-text)
Images should have alternate text (alt text)


67-67: null (MD045, no-alt-text)
Images should have alternate text (alt text)


68-68: null (MD045, no-alt-text)
Images should have alternate text (alt text)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f088e43 and 91d99c4.

Files selected for processing (5)
  • .github/workflows/release-drafter-mockstorage.yml (1 hunks)
  • README.md (1 hunks)
  • mockstorage/README.md (1 hunks)
  • mockstorage/mockstorage.go (1 hunks)
  • mockstorage/mockstorage_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/release-drafter-mockstorage.yml
Files skipped from review as they are similar to previous changes (2)
  • mockstorage/mockstorage.go
  • mockstorage/mockstorage_test.go
Additional context used
Markdownlint
mockstorage/README.md

121-121: Column: 1 (MD010, no-hard-tabs)
Hard tabs


154-154: Column: 1 (MD010, no-hard-tabs)
Hard tabs


161-161: Column: 1 (MD010, no-hard-tabs)
Hard tabs


162-162: Column: 1 (MD010, no-hard-tabs)
Hard tabs


163-163: Column: 1 (MD010, no-hard-tabs)
Hard tabs


164-164: Column: 1 (MD010, no-hard-tabs)
Hard tabs


165-165: Column: 1 (MD010, no-hard-tabs)
Hard tabs


166-166: Column: 1 (MD010, no-hard-tabs)
Hard tabs


167-167: Column: 1 (MD010, no-hard-tabs)
Hard tabs


168-168: Column: 1 (MD010, no-hard-tabs)
Hard tabs


169-169: Column: 1 (MD010, no-hard-tabs)
Hard tabs


24-24: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


17-17: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


54-54: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


84-84: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


94-94: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


151-151: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


158-158: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


86-86: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


88-88: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


90-90: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


96-96: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


101-101: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


152-152: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


159-159: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


15-15: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading

README.md

29-29: Column: 1 (MD010, no-hard-tabs)
Hard tabs


30-30: Column: 1 (MD010, no-hard-tabs)
Hard tabs


31-31: Column: 1 (MD010, no-hard-tabs)
Hard tabs


33-33: Column: 1 (MD010, no-hard-tabs)
Hard tabs


34-34: Column: 1 (MD010, no-hard-tabs)
Hard tabs


35-35: Column: 1 (MD010, no-hard-tabs)
Hard tabs


36-36: Column: 1 (MD010, no-hard-tabs)
Hard tabs


38-38: Column: 1 (MD010, no-hard-tabs)
Hard tabs


39-39: Column: 1 (MD010, no-hard-tabs)
Hard tabs


40-40: Column: 1 (MD010, no-hard-tabs)
Hard tabs


42-42: Column: 1 (MD010, no-hard-tabs)
Hard tabs


43-43: Column: 1 (MD010, no-hard-tabs)
Hard tabs


45-45: Column: 1 (MD010, no-hard-tabs)
Hard tabs


46-46: Column: 1 (MD010, no-hard-tabs)
Hard tabs


47-47: Column: 1 (MD010, no-hard-tabs)
Hard tabs


13-13: null (MD045, no-alt-text)
Images should have alternate text (alt text)


16-16: null (MD045, no-alt-text)
Images should have alternate text (alt text)


19-19: null (MD045, no-alt-text)
Images should have alternate text (alt text)


53-53: null (MD045, no-alt-text)
Images should have alternate text (alt text)


54-54: null (MD045, no-alt-text)
Images should have alternate text (alt text)


55-55: null (MD045, no-alt-text)
Images should have alternate text (alt text)


56-56: null (MD045, no-alt-text)
Images should have alternate text (alt text)


57-57: null (MD045, no-alt-text)
Images should have alternate text (alt text)


58-58: null (MD045, no-alt-text)
Images should have alternate text (alt text)


59-59: null (MD045, no-alt-text)
Images should have alternate text (alt text)


60-60: null (MD045, no-alt-text)
Images should have alternate text (alt text)


61-61: null (MD045, no-alt-text)
Images should have alternate text (alt text)


62-62: null (MD045, no-alt-text)
Images should have alternate text (alt text)


63-63: null (MD045, no-alt-text)
Images should have alternate text (alt text)


64-64: null (MD045, no-alt-text)
Images should have alternate text (alt text)


65-65: null (MD045, no-alt-text)
Images should have alternate text (alt text)


66-66: null (MD045, no-alt-text)
Images should have alternate text (alt text)


67-67: null (MD045, no-alt-text)
Images should have alternate text (alt text)


68-68: null (MD045, no-alt-text)
Images should have alternate text (alt text)


69-69: null (MD045, no-alt-text)
Images should have alternate text (alt text)


70-70: null (MD045, no-alt-text)
Images should have alternate text (alt text)


71-71: null (MD045, no-alt-text)
Images should have alternate text (alt text)


72-72: null (MD045, no-alt-text)
Images should have alternate text (alt text)


73-73: null (MD045, no-alt-text)
Images should have alternate text (alt text)


74-74: null (MD045, no-alt-text)
Images should have alternate text (alt text)


75-75: null (MD045, no-alt-text)
Images should have alternate text (alt text)


76-76: null (MD045, no-alt-text)
Images should have alternate text (alt text)

Additional comments not posted (3)
mockstorage/README.md (2)

39-51: Excellent documentation of the CustomFuncs struct.

This struct clearly outlines the customizable functions available for MockStorage, which enhances flexibility for testing scenarios.


56-82: Well-documented functions for the Storage struct.

The functions are well-documented, providing clear usage examples and parameters. This will be very helpful for developers integrating this storage option.

README.md (1)

65-65: Successfully added MockStorage to the list of storage implementations.

The addition of MockStorage to the list, complete with a link to its specific tests, is well-executed and provides easy access to relevant information.

Tools
Markdownlint

65-65: null (MD045, no-alt-text)
Images should have alternate text (alt text)

mockstorage/README.md Show resolved Hide resolved
mockstorage/README.md Show resolved Hide resolved
mockstorage/README.md Show resolved Hide resolved
@ReneWerner87 ReneWerner87 merged commit 57dedb7 into main Jun 6, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants