Skip to content

chore(docs): specify syntax highlighting language for code blocks#51

Merged
cnlangzi merged 3 commits intoyaitoo:mainfrom
domust:main
Sep 1, 2025
Merged

chore(docs): specify syntax highlighting language for code blocks#51
cnlangzi merged 3 commits intoyaitoo:mainfrom
domust:main

Conversation

@domust
Copy link
Copy Markdown
Contributor

@domust domust commented Aug 30, 2025

Hi,

I've been using this library for the last couple of days and it's great.
It was a bit hard to read documentation without syntax highlighting though, so I've decided to contribute. I've tried to follow the commit message format to the best of my ability.

Summary by Sourcery

Specify syntax highlighting languages for code blocks in README.md

Documentation:

  • Annotate Go code examples with ```go fences for syntax highlighting
  • Annotate SQL examples with ```sql fences for syntax highlighting

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Aug 30, 2025

Reviewer's Guide

This PR improves the README.md by adding explicit language identifiers to code fences for syntax highlighting and tidies up formatting and whitespace for clearer documentation.

File-Level Changes

Change Details Files
Add language identifiers to code fences for syntax highlighting
  • Annotated Go code blocks with "go"
  • Labeled migration SQL examples with "sql"
  • Applied language tags consistently across all examples
README.md
Refine formatting and remove extraneous whitespace
  • Trimmed trailing spaces and redundant blank lines
  • Normalized indentation and list item formatting
  • Removed stray markers and ensured consistent spacing
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • A few code blocks (e.g. the migration go:embed snippet) are still using generic fences—consider labeling all fences (go, ```sql) for consistency.
  • The migration SQL example now uses ```sql, but the previous unannotated fences elsewhere could benefit from language tags as well to improve readability.
  • The change to add a > on the "All examples…" line looks like it might break list or blockquote formatting—please verify that it renders correctly in Markdown.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- A few code blocks (e.g. the migration go:embed snippet) are still using generic ``` fences—consider labeling all fences (```go, ```sql) for consistency.
- The migration SQL example now uses ```sql, but the previous unannotated fences elsewhere could benefit from language tags as well to improve readability.
- The change to add a `>` on the "All examples…" line looks like it might break list or blockquote formatting—please verify that it renders correctly in Markdown.

## Individual Comments

### Comment 1
<location> `README.md:515` </location>
<code_context>
-see more [examples](./migrate/migrator_test.go?L40) 
+see more [examples](./migrate/migrator_test.go?L40)

 if a table has been rotated, and migration should be started with `/* rotate: monthly=20240201-20240401*/` as first line. so the migration is applied automatically on the table and all it's rotated tables from 20240201 to 20240401.
-```
+```sql
</code_context>

<issue_to_address>
Typo: 'it's' should be 'its' (possessive form).

'It's' is a contraction for 'it is'; use 'its' for the possessive form here.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
if a table has been rotated, and migration should be started with `/* rotate: monthly=20240201-20240401*/` as first line. so the migration is applied automatically on the table and all it's rotated tables from 20240201 to 20240401.
=======
if a table has been rotated, and migration should be started with `/* rotate: monthly=20240201-20240401*/` as first line. so the migration is applied automatically on the table and all its rotated tables from 20240201 to 20240401.
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepsource-io
Copy link
Copy Markdown

deepsource-io bot commented Aug 30, 2025

Here's the code health analysis summary for commits f2035b4..09160a1. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Go LogoGo✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.71%. Comparing base (f2035b4) to head (09160a1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #51   +/-   ##
=======================================
  Coverage   75.71%   75.71%           
=======================================
  Files          46       46           
  Lines        2368     2368           
=======================================
  Hits         1793     1793           
  Misses        456      456           
  Partials      119      119           
Flag Coverage Δ
Unit-Tests 75.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@cnlangzi cnlangzi left a comment

Choose a reason for hiding this comment

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

Well done. Thanks for your PR

@cnlangzi
Copy link
Copy Markdown
Member

@domust docs should not affect Lint check. It must be an other problem. I'm really appreciated if you can get some time left to check and fix it. thanks.

@domust
Copy link
Copy Markdown
Contributor Author

domust commented Aug 31, 2025

@cnlangzi it was the default behavior of golangci-lint, it lints the entire project instead of only the parts that were changed.

How would you like to proceed with the whole merging process? The 2 additional commits that addressed the issues don't follow the project's convention. Will those be squashed on merge or will I have to update the PR to contain only a single commit for it to be merged?

Copy link
Copy Markdown
Member

@cnlangzi cnlangzi left a comment

Choose a reason for hiding this comment

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

Excellent PR 👍

@cnlangzi
Copy link
Copy Markdown
Member

@cnlangzi it was the default behavior of golangci-lint, it lints the entire project instead of only the parts that were changed.

How would you like to proceed with the whole merging process? The 2 additional commits that addressed the issues don't follow the project's convention. Will those be squashed on merge or will I have to update the PR to contain only a single commit for it to be merged?

  • only_new_issue seems don't work.
  • Don't worry about commit log, let's squashed them on merging.

@cnlangzi
Copy link
Copy Markdown
Member

cnlangzi commented Sep 1, 2025

@domust let's merge it first. It should run the old github action from main branch.

@cnlangzi cnlangzi merged commit 13b5269 into yaitoo:main Sep 1, 2025
4 of 5 checks passed
@domust
Copy link
Copy Markdown
Contributor Author

domust commented Sep 2, 2025

@cnlangzi if only_new_issue doesn't work, it means that golangci-lint is reporting errors incorrectly when go.sum is missing entries. go mod tidy would fix the issue if that's the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants