nanos-lint 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # nanos-lint
2
2
 
3
3
  [![CI](https://github.com/vugi99/nanos-lint/actions/workflows/ci.yml/badge.svg)](https://github.com/vugi99/nanos-lint/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/nanos-lint.svg)](https://www.npmjs.com/package/nanos-lint)
4
5
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D24-brightgreen.svg)](https://nodejs.org/)
5
6
  [![Lua Version](https://img.shields.io/badge/Lua-5.4.9-blue.svg)](https://www.lua.org/manual/5.4/)
6
7
  [![LuaLS Version](https://img.shields.io/badge/LuaLS-3.19.1-brightgreen.svg)](https://github.com/LuaLS/lua-language-server)
@@ -95,6 +96,7 @@ jobs:
95
96
  | `path` | Path to workspace directory or Lua file to check | `.` |
96
97
  | `checklevel` | Minimum severity to report (`Error`, `Warning`, `Information`, `Hint`) | `Warning` |
97
98
  | `config` | Path to a custom `.luarc.json` configuration file | `""` |
99
+ | `annotations` | Path to a custom `annotations.lua` file | `""` |
98
100
  | `ignore` | Files or directories to ignore (supports glob patterns, newline or comma separated) | `""` |
99
101
  | `luals-version` | Version of `lua-language-server` to use | `latest` |
100
102
  | `fail-on-error` | Fail the workflow step if diagnostics are found | `true` |
@@ -113,6 +115,7 @@ COMMANDS:
113
115
  check [path] Check a workspace or Lua file (default)
114
116
  init [path] Scaffold a .luarc.json configuration in the workspace (copies definitions to .nanos-lint/)
115
117
  download-luals [version] Download and cache the LuaLS binary
118
+ clean-cache, clean Clear the nanos-lint cache directory
116
119
  help, --help, -h Show help message
117
120
  version, --version, -v Show version information
118
121
 
@@ -120,6 +123,7 @@ OPTIONS:
120
123
  -i, --ignore <pattern> Files or directories to ignore (supports globs, repeatable, comma/newline-separated)
121
124
  --checklevel=<level> Minimum diagnostic level: Error, Warning, Information, Hint (default: Warning)
122
125
  --config=<path> Path to custom .luarc.json configuration file
126
+ --annotations=<path> Path to custom annotations.lua file
123
127
  --format=<format> Output format: pretty, json, github (default: pretty)
124
128
  --github Output in GitHub Actions format (shortcut for --format=github)
125
129
  --luals-version=<ver> Version of LuaLS to use (default: latest)
@@ -133,6 +137,8 @@ OPTIONS:
133
137
  | Variable | Description |
134
138
  | :--- | :--- |
135
139
  | `LUALS_BIN` | Explicit path to a pre-installed `lua-language-server` binary |
140
+ | `NANOS_ANNOTATIONS_PATH`, `NANOS_ANNOTATIONS` | Explicit path to a custom `annotations.lua` file |
141
+ | `GITHUB_TOKEN` | GitHub personal access token used for authenticated GitHub API requests (avoids unauthenticated rate limits) |
136
142
  | `NO_COLOR` | Disables ANSI color output when set to any non-empty value |
137
143
  | `FORCE_COLOR` | Forces ANSI color output even in non-TTY environments |
138
144
 
@@ -165,41 +171,38 @@ npx nanos-lint init --force
165
171
 
166
172
  ---
167
173
 
168
- ## Standalone Binary Distributions (Offline / CD)
174
+ ## Pre-packaged Release Distributions (Offline / CD)
169
175
 
170
- For environments without Node.js, pre-packaged release bundles containing the compiled `lua-language-server` binary and nanos-lint wrapper are available on the [Releases](https://github.com/vugi99/nanos-lint/releases) page:
176
+ Pre-packaged release bundles containing the platform's `lua-language-server` binary, vendored `annotations.lua`, and the nanos-lint CLI wrapper are available on the [Releases](https://github.com/vugi99/nanos-lint/releases) page:
171
177
 
172
178
  - `nanos-lint-<version>-windows-x64.zip`
173
179
  - `nanos-lint-<version>-linux-x64.tar.gz`
174
180
 
175
- Simply extract the archive and run `./nanos-lint` (Linux) or `nanos-lint.cmd` (Windows).
181
+ These bundles are fully self-contained and ready for offline CI/CD environments with Node.js installed, eliminating the need to download LuaLS or annotations at runtime. Simply extract the archive and run `./nanos-lint` (Linux) or `nanos-lint.cmd` (Windows).
176
182
 
177
183
  ---
178
184
 
179
185
  ## Development
180
186
 
181
187
  ```bash
182
- # Clone with submodules
183
- git clone --recursive https://github.com/vugi99/nanos-lint.git
188
+ # Clone the repository
189
+ git clone https://github.com/vugi99/nanos-lint.git
184
190
  cd nanos-lint
185
191
 
186
192
  # Install dependencies
187
193
  npm install
188
194
 
189
- # Update annotations submodule from upstream
190
- git submodule update --remote --merge
191
-
192
195
  # Run ESLint
193
196
  npm run lint
194
197
 
195
198
  # Run type check
196
199
  npm run typecheck
197
200
 
198
- # Run Vitest test suite (unit + live LuaLS integration tests)
199
- npm test
200
-
201
201
  # Build distribution bundle
202
202
  npm run build
203
+
204
+ # Run Vitest test suite with coverage (unit + live LuaLS integration tests)
205
+ npm run test:coverage
203
206
  ```
204
207
 
205
208
  See [AGENTS.md](AGENTS.md) for development philosophy and quality gate requirements.
package/action.yml CHANGED
@@ -18,6 +18,10 @@ inputs:
18
18
  description: 'Path to a custom .luarc.json configuration file'
19
19
  required: false
20
20
  default: ''
21
+ annotations:
22
+ description: 'Path to a custom annotations.lua file'
23
+ required: false
24
+ default: ''
21
25
  luals-version:
22
26
  description: 'Version of LuaLS to use (or "latest")'
23
27
  required: false
@@ -49,6 +53,7 @@ runs:
49
53
  INPUT_PATH: ${{ inputs.path }}
50
54
  INPUT_CHECKLEVEL: ${{ inputs.checklevel }}
51
55
  INPUT_CONFIG: ${{ inputs.config }}
56
+ INPUT_ANNOTATIONS: ${{ inputs.annotations }}
52
57
  INPUT_LUALS_VERSION: ${{ inputs.luals-version }}
53
58
  INPUT_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
54
59
  INPUT_QUIET: ${{ inputs.quiet }}
@@ -61,6 +66,10 @@ runs:
61
66
  ARGS+=("--config=$INPUT_CONFIG")
62
67
  fi
63
68
 
69
+ if [ -n "$INPUT_ANNOTATIONS" ]; then
70
+ ARGS+=("--annotations=$INPUT_ANNOTATIONS")
71
+ fi
72
+
64
73
  if [ -n "$INPUT_IGNORE" ]; then
65
74
  while IFS= read -r line || [ -n "$line" ]; do
66
75
  trimmed=$(echo "$line" | xargs)