Skip to content

chore(types): drop LuaLS blanket disables, fix remaining hidden diagnostics#150

Merged
dlyongemallo merged 1 commit intomainfrom
fix_remaining_diagnostics
May 3, 2026
Merged

chore(types): drop LuaLS blanket disables, fix remaining hidden diagnostics#150
dlyongemallo merged 1 commit intomainfrom
fix_remaining_diagnostics

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 3, 2026 00:02
@dlyongemallo dlyongemallo changed the title chore(types): drop LuaLS blanket disables, fix remaining hidden diagn……ostics chore(types): drop LuaLS blanket disables, fix remaining hidden diagnostics May 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the blanket LuaLS diagnostic disables from .luarc.json and updates type annotations/casts across the Lua codebase so strict type-checking can run cleanly again. It mostly adjusts optional fields and narrow type assertions in core VCS, UI, rendering, and utility modules that Diffview uses throughout diff and file-history flows.

Changes:

  • Replaced many overly strict or inaccurate Lua annotations with optional fields/casts that better match current runtime usage.
  • Updated several adapter, panel, renderer, stream, job, and utility call sites to satisfy LuaLS without changing intended behavior.
  • Cleared the repo-wide LuaLS disable list in .luarc.json so diagnostics are now expected to be handled locally.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lua/diffview/vcs/rev.lua Tightens Rev.type annotation to use RevType.
lua/diffview/vcs/init.lua Marks adapter command-context fields optional.
lua/diffview/vcs/file.lua Relaxes File field annotations and normalizes extension to "".
lua/diffview/vcs/commit.lua Makes commit ref names optional in typing.
lua/diffview/vcs/adapters/p4/init.lua Adds typed fallback for selected_file.
lua/diffview/vcs/adapters/null/init.lua Adds a cast for NullAdapter.Rev.
lua/diffview/vcs/adapters/hg/init.lua Reworks HG file-history option typing/default seeding.
lua/diffview/vcs/adapters/git/parser.lua Fixes optional parser fields and numeric fallback typing.
lua/diffview/vcs/adapters/git/init.lua Adjusts git history option building, command args, and casts.
lua/diffview/vcs/adapter.lua Updates adapter context/bootstrap/layout type annotations.
lua/diffview/utils.lua Marks many utility option-table fields optional and adds casts.
lua/diffview/ui/panel.lua Refines panel config typings and vim.validate type names.
lua/diffview/ui/models/file_tree/file_tree.lua Makes _node back-reference optional in typing.
lua/diffview/stream.lua Replaces enum helper with plain table + reverse lookup.
lua/diffview/scene/window.lua Seeds attach-state keymap storage and tightens nil comparison.
lua/diffview/scene/views/file_history/option_panel.lua Simplifies option assignment and adds component cast.
lua/diffview/scene/views/file_history/file_history_panel.lua Adds component/layout casts in file-history panel updates.
lua/diffview/scene/views/diff/file_panel.lua Adds component cast in diff file panel rendering.
lua/diffview/scene/views/diff/diff_view.lua Asserts fs-poll handle creation for index watching.
lua/diffview/scene/layouts/diff_1_inline.lua Adds buffer-number casts in inline diff paths.
lua/diffview/scene/file_entry.lua Broadens adapter typing and normalizes extension typing.
lua/diffview/renderer.lua Corrects highlight-list type annotations.
lua/diffview/perf.lua Refines lap-entry typing and string conversion.
lua/diffview/path.lua Marks normalize options optional.
lua/diffview/logger.lua Replaces outfile-status enum helper and relaxes log option typing.
lua/diffview/lib.lua Adds typed casts for parsed -C flag values.
lua/diffview/lazy.lua Broadens lazy helper return annotations to any.
lua/diffview/job.lua Tightens pipe creation asserts and signal typing.
lua/diffview/hl.lua Makes highlight spec/data fields optional and adds cast.
lua/diffview/config.lua Updates config type comments and HG log-option defaults.
lua/diffview/arg_parser.lua Refines flag/scan type annotations and return casts.
lua/diffview/actions.lua Makes compatibility fold command list optional.
.luarc.json Removes the blanket LuaLS disabled diagnostics list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/vcs/adapter.lua Outdated
Comment thread lua/diffview/scene/views/file_history/file_history_panel.lua Outdated
Comment thread lua/diffview/lazy.lua Outdated
Comment thread lua/diffview/lazy.lua Outdated
@dlyongemallo dlyongemallo force-pushed the fix_remaining_diagnostics branch from 59b8a3b to 26c8568 Compare May 3, 2026 00:20
@dlyongemallo dlyongemallo force-pushed the fix_remaining_diagnostics branch from 26c8568 to 70ed55e Compare May 3, 2026 00:30
@dlyongemallo dlyongemallo merged commit 0062609 into main May 3, 2026
5 checks passed
@dlyongemallo dlyongemallo deleted the fix_remaining_diagnostics branch May 3, 2026 00:30
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