Skip to content

chore: add stylua linting for vfox plugin Lua files#7960

Merged
jdx merged 1 commit into
mainfrom
chore/add-stylua-lint
Feb 2, 2026
Merged

chore: add stylua linting for vfox plugin Lua files#7960
jdx merged 1 commit into
mainfrom
chore/add-stylua-lint

Conversation

@jdx

@jdx jdx commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add stylua as a linting step in hk.pkl for crates/vfox/plugins/**/*.lua
  • Add stylua as a dev dependency in mise.toml
  • Apply stylua formatting to all vfox test plugin Lua files (spaces→tabs, trailing commas, newlines at EOF)

Test plan

  • stylua --check crates/vfox/plugins/ passes
  • CI passes

🤖 Generated with Claude Code


Note

Low Risk
Low risk: adds a formatting/linting tool and applies whitespace-only reformatting to Lua plugin fixtures, with no functional logic changes expected.

Overview
Adds StyLua as an hk linter/auto-fixer for crates/vfox/plugins/**/*.lua and includes stylua in mise.toml/mise.lock so the tool is available in dev.

Reformats the vfox plugin Lua sources (dummy, template hooks, and test-nodejs) to match StyLua output (tabs/indentation, trailing commas, and ensuring newline at EOF), without changing behavior.

Written by Cursor Bugbot for commit 1259a2b. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings February 2, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds stylua as a linting tool for Lua files in the vfox plugin directory. The changes ensure consistent code formatting across the project's Lua codebase by standardizing on tabs for indentation, adding trailing commas, and ensuring proper newlines at end of files.

Changes:

  • Added stylua linting configuration to hk.pkl with check and fix commands for vfox plugin Lua files
  • Added stylua as a dev dependency in mise.toml
  • Applied stylua formatting across all vfox test plugin Lua files (whitespace normalization, trailing commas)

Reviewed changes

Copilot reviewed 11 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mise.toml Added stylua as a development dependency
hk.pkl Configured stylua linting step for vfox plugin Lua files
crates/vfox/plugins/test-nodejs/metadata.lua Applied stylua formatting (indentation, trailing comma)
crates/vfox/plugins/test-nodejs/hooks/parse_legacy_file.lua Applied stylua formatting (indentation, trailing comma)
crates/vfox/plugins/test-nodejs/hooks/env_keys.lua Applied stylua formatting (indentation, trailing commas)
crates/vfox/plugins/test-nodejs/hooks/available.lua Applied stylua formatting (indentation, trailing commas)
crates/vfox/plugins/hooks/env_keys.lua Applied stylua formatting (indentation, trailing commas, removed trailing newline)
crates/vfox/plugins/dummy/metadata.lua Applied stylua formatting (indentation, trailing comma)
crates/vfox/plugins/dummy/hooks/env_keys.lua Applied stylua formatting (indentation, trailing commas, removed trailing newline)
crates/vfox/plugins/dummy/hooks/available.lua Applied stylua formatting (indentation, trailing commas)
crates/vfox/plugins/dummy/Injection.lua Removed trailing blank line

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

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces stylua, a Lua code formatter, into the project's development workflow. The primary goal is to establish and maintain consistent code style across all Lua plugin files for vfox, thereby enhancing code readability and maintainability. This involves configuring the new tool for linting and applying its formatting rules to existing Lua codebases.

Highlights

  • Stylua Integration: The stylua linter has been integrated into the project's hk.pkl configuration, specifically targeting all Lua files within crates/vfox/plugins/**/*.lua to enforce consistent code style.
  • Development Dependency: stylua has been added as a new development dependency in mise.toml, ensuring it is available for local development and CI environments.
  • Code Formatting Applied: Existing vfox test plugin Lua files have been reformatted using stylua, standardizing indentation to tabs, adding trailing commas where appropriate, and ensuring newlines at the end of files.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx force-pushed the chore/add-stylua-lint branch from b6be481 to 1259a2b Compare February 2, 2026 12:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces stylua for linting and formatting Lua files, which is a great addition for maintaining consistent code style. The configuration for the new tool and the dev dependency are correctly added. The automatic formatting changes applied to the existing Lua files are also included.

My review includes one suggestion for hk.pkl to improve the efficiency of the new linting step by using the {{files}} placeholder, which will avoid re-scanning the entire directory for each file. This is an important optimization, especially for pre-commit hooks.

Comment thread hk.pkl
Comment on lines +60 to +61
check = "stylua --check crates/vfox/plugins/"
fix = "stylua crates/vfox/plugins/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The check and fix commands for stylua are configured to run on the entire crates/vfox/plugins/ directory. Since hk runs this command for each file matching the glob (as batch defaults to false), this is inefficient. It causes the entire directory to be scanned for every single Lua file change.

You should use the {{files}} placeholder to pass only the relevant file(s) to the command. This will be much more performant, especially in pre-commit hooks.

I'd also recommend applying a similar change to the lua-check step for consistency and performance.

        check = "stylua --check {{files}}"
        fix = "stylua {{files}}"

@jdx jdx merged commit 84af6c9 into main Feb 2, 2026
36 checks passed
@jdx jdx deleted the chore/add-stylua-lint branch February 2, 2026 12:16
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.1 x -- echo 21.6 ± 0.9 20.9 41.1 1.00
mise x -- echo 22.3 ± 0.3 21.7 23.1 1.03 ± 0.05

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.1 env 20.6 ± 0.7 19.2 27.1 1.00
mise env 20.9 ± 0.6 19.3 22.3 1.01 ± 0.05

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.1 hook-env 21.5 ± 0.5 20.0 23.2 1.03 ± 0.07
mise hook-env 20.9 ± 1.3 19.9 42.0 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.1 ls 18.5 ± 0.5 17.6 22.7 1.00
mise ls 19.3 ± 0.8 17.8 21.4 1.05 ± 0.06

xtasks/test/perf

Command mise-2026.2.1 mise Variance
install (cached) 113ms 113ms +0%
ls (cached) 70ms 71ms -1%
bin-paths (cached) 74ms 73ms +1%
task-ls (cached) 531ms 540ms -1%

mise-en-dev added a commit that referenced this pull request Feb 3, 2026
### 🚀 Features

- **(asset-matcher)** enable `mingw-w64` detection for windows packages
by @lchagnoleau in [#7981](#7981)
- **(crates/vfox)** add download_path to BackendInstall context by
@malept in [#7959](#7959)
- **(python)** rework `python.uv_venv_auto` setting by @halms in
[#7905](#7905)
- add "Did you mean?" suggestions and inactive tool warnings by @jdx in
[#7965](#7965)

### 🐛 Bug Fixes

- **(hook-env)** skip remote version fetching for uninstalled tools in
prefer-offline mode by @jdx in
[#7976](#7976)
- **(install.sh)** Corret `setup` to `set up` by @gogolok in
[#7980](#7980)
- retry spawn on ETXTBSY (Text file busy) by @jdx in
[#7964](#7964)
- improve ToolOptions parsing to support comma separated values by
@roele in [#7971](#7971)

### 📚 Documentation

- improve plugin documentation with comparisons and template links by
@jdx in [#7962](#7962)

### 📦️ Dependency Updates

- bump hyper-util, system-configuration, lru, aws-sdk, and others by
@jdx in [#7977](#7977)

### Chore

- **(vfox)** add LuaCATS type definitions for plugin IDE support by @jdx
in [#7961](#7961)
- **(vfox)** add `download_path` to `BackendInstallCtx` type defintion
by @malept in [#7973](#7973)
- add stylua linting for vfox plugin Lua files by @jdx in
[#7960](#7960)
- use system Rust for PPA builds on Ubuntu 26.04+ by @jdx in
[#7956](#7956)

### New Contributors

- @gogolok made their first contribution in
[#7980](#7980)

## 📦 Aqua Registry Updates

#### New Packages (4)

- [`autobrr/mkbrr`](https://github.com/autobrr/mkbrr)
- [`dodobrands/Peekie`](https://github.com/dodobrands/Peekie)
-
[`grpc/grpc-java/protoc-gen-grpc-java`](https://github.com/grpc/grpc-java/protoc-gen-grpc-java)
-
[`str4d/age-plugin-yubikey`](https://github.com/str4d/age-plugin-yubikey)

#### Updated Packages (3)

- [`biomejs/biome`](https://github.com/biomejs/biome)
-
[`rust-cross/cargo-zigbuild`](https://github.com/rust-cross/cargo-zigbuild)
- [`siderolabs/talos`](https://github.com/siderolabs/talos)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
## Summary
- Add stylua as a linting step in `hk.pkl` for
`crates/vfox/plugins/**/*.lua`
- Add stylua as a dev dependency in `mise.toml`
- Apply stylua formatting to all vfox test plugin Lua files
(spaces→tabs, trailing commas, newlines at EOF)

## Test plan
- [x] `stylua --check crates/vfox/plugins/` passes
- [ ] CI passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: adds a formatting/linting tool and applies whitespace-only
reformatting to Lua plugin fixtures, with no functional logic changes
expected.
> 
> **Overview**
> Adds **StyLua** as an hk linter/auto-fixer for
`crates/vfox/plugins/**/*.lua` and includes `stylua` in
`mise.toml`/`mise.lock` so the tool is available in dev.
> 
> Reformats the vfox plugin Lua sources (dummy, template hooks, and
test-nodejs) to match StyLua output (tabs/indentation, trailing commas,
and ensuring newline at EOF), without changing behavior.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1259a2b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(asset-matcher)** enable `mingw-w64` detection for windows packages
by @lchagnoleau in [jdx#7981](jdx#7981)
- **(crates/vfox)** add download_path to BackendInstall context by
@malept in [jdx#7959](jdx#7959)
- **(python)** rework `python.uv_venv_auto` setting by @halms in
[jdx#7905](jdx#7905)
- add "Did you mean?" suggestions and inactive tool warnings by @jdx in
[jdx#7965](jdx#7965)

### 🐛 Bug Fixes

- **(hook-env)** skip remote version fetching for uninstalled tools in
prefer-offline mode by @jdx in
[jdx#7976](jdx#7976)
- **(install.sh)** Corret `setup` to `set up` by @gogolok in
[jdx#7980](jdx#7980)
- retry spawn on ETXTBSY (Text file busy) by @jdx in
[jdx#7964](jdx#7964)
- improve ToolOptions parsing to support comma separated values by
@roele in [jdx#7971](jdx#7971)

### 📚 Documentation

- improve plugin documentation with comparisons and template links by
@jdx in [jdx#7962](jdx#7962)

### 📦️ Dependency Updates

- bump hyper-util, system-configuration, lru, aws-sdk, and others by
@jdx in [jdx#7977](jdx#7977)

### Chore

- **(vfox)** add LuaCATS type definitions for plugin IDE support by @jdx
in [jdx#7961](jdx#7961)
- **(vfox)** add `download_path` to `BackendInstallCtx` type defintion
by @malept in [jdx#7973](jdx#7973)
- add stylua linting for vfox plugin Lua files by @jdx in
[jdx#7960](jdx#7960)
- use system Rust for PPA builds on Ubuntu 26.04+ by @jdx in
[jdx#7956](jdx#7956)

### New Contributors

- @gogolok made their first contribution in
[jdx#7980](jdx#7980)

## 📦 Aqua Registry Updates

#### New Packages (4)

- [`autobrr/mkbrr`](https://github.com/autobrr/mkbrr)
- [`dodobrands/Peekie`](https://github.com/dodobrands/Peekie)
-
[`grpc/grpc-java/protoc-gen-grpc-java`](https://github.com/grpc/grpc-java/protoc-gen-grpc-java)
-
[`str4d/age-plugin-yubikey`](https://github.com/str4d/age-plugin-yubikey)

#### Updated Packages (3)

- [`biomejs/biome`](https://github.com/biomejs/biome)
-
[`rust-cross/cargo-zigbuild`](https://github.com/rust-cross/cargo-zigbuild)
- [`siderolabs/talos`](https://github.com/siderolabs/talos)
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