[PR #77] [MERGED] Add optional and pluggable Lua formatting for DumpLuaBlock #77

Closed
opened 2026-02-28 01:20:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/77
Author: @tufanbarisyildirim
Created: 2/20/2026
Status: Merged
Merged: 2/20/2026
Merged by: @tufanbarisyildirim

Base: masterHead: fix/issue-73-optional-lua-formatting


📝 Commits (1)

  • 68f22f5 Add optional and pluggable Lua formatting in dumper

📊 Changes

4 files changed (+84 additions, -9 deletions)

View changed files

📝 GUIDE.md (+4 -0)
📝 dumper/dumper.go (+26 -9)
📝 dumper/lua.go (+11 -0)
📝 dumper/lua_test.go (+43 -0)

📄 Description

Summary

  • add Style.WithLuaFormatting(enabled bool) to allow disabling Lua formatting in DumpLuaBlock
  • add Style.WithLuaFormatter(formatter LuaFormatterFunc) for custom/pluggable formatting behavior
  • preserve current default behavior (Lua formatting remains enabled unless explicitly disabled)
  • add dumper tests for disabled formatting and custom formatter usage
  • document new style fields/methods in GUIDE.md

Testing

  • go test ./dumper -run 'TestDumpLuaBlock_(DisableFormatting|UsesCustomFormatter|PreservesLiteralsAndHashComments|InvalidLuaFallsBackToOriginal)'
  • go test ./dumper
  • make test

Closes #73


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tufanbarisyildirim/gonginx/pull/77 **Author:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Base:** `master` ← **Head:** `fix/issue-73-optional-lua-formatting` --- ### 📝 Commits (1) - [`68f22f5`](https://github.com/tufanbarisyildirim/gonginx/commit/68f22f577efd4b072a1cb25ed0962b308c380065) Add optional and pluggable Lua formatting in dumper ### 📊 Changes **4 files changed** (+84 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `GUIDE.md` (+4 -0) 📝 `dumper/dumper.go` (+26 -9) 📝 `dumper/lua.go` (+11 -0) 📝 `dumper/lua_test.go` (+43 -0) </details> ### 📄 Description ## Summary - add `Style.WithLuaFormatting(enabled bool)` to allow disabling Lua formatting in `DumpLuaBlock` - add `Style.WithLuaFormatter(formatter LuaFormatterFunc)` for custom/pluggable formatting behavior - preserve current default behavior (Lua formatting remains enabled unless explicitly disabled) - add dumper tests for disabled formatting and custom formatter usage - document new style fields/methods in `GUIDE.md` ## Testing - `go test ./dumper -run 'TestDumpLuaBlock_(DisableFormatting|UsesCustomFormatter|PreservesLiteralsAndHashComments|InvalidLuaFallsBackToOriginal)'` - `go test ./dumper` - `make test` Closes #73 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:20:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#77
No description provided.