Skip to content

Commit c66ae25

Browse files
committed
Apply linter fixes added in previous commit
1 parent a89808b commit c66ae25

File tree

78 files changed

+431
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+431
-447
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ jobs:
8181
- name: Upload
8282
if: ${{ matrix.cross != 'zigbuild' }}
8383
uses: actions/upload-artifact@v4
84-
with:
84+
with:
8585
name: ${{ matrix.crate }}-${{ matrix.platform }}
8686
path: ${{ github.workspace }}/artifact/
8787
- name: Upload zigbuild
8888
if: ${{ matrix.cross == 'zigbuild' }}
8989
uses: actions/upload-artifact@v4
90-
with:
90+
with:
9191
name: ${{ matrix.crate }}-${{ matrix.platform }}-glibc.${{ matrix.glibc }}
9292
path: ${{ github.workspace }}/artifact/
9393
release:
@@ -136,7 +136,7 @@ jobs:
136136
7z a emmylua_doc_cli-win32-x64.zip emmylua_doc_cli.exe
137137
- name: Release
138138
uses: softprops/action-gh-release@v2
139-
with:
139+
with:
140140
name: emmylua_ls
141141
draft: false
142142
generate_release_notes: true

.github/workflows/upload_cachix.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- nixos-24.11 # remove this when 25.05 is out of beta
1818
- nixos-unstable
1919
- nixpkgs-unstable
20-
20+
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Clone repo
2424
uses: actions/checkout@v4
25-
25+
2626
- name: Setup Nix
2727
uses: cachix/install-nix-action@v30
2828
with:
@@ -34,13 +34,13 @@ jobs:
3434
- name: Show the current nixpkgs version
3535
run: |
3636
nix eval --impure --raw --expr '"Building for nixpkgs " + (import <nixpkgs> { }).lib.version'
37-
37+
3838
- name: Setup Cachix
3939
uses: cachix/cachix-action@v15
4040
with:
4141
name: emmylua-analyzer
4242
authToken: '${{ secrets.CACHIX }}'
43-
43+
4444
- name: Build emmylua-analyzer
4545
run: |
4646
for x in emmylua_{ls,doc_cli,check}; do

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/target
22
.idea
33
.cursor
4-
dhat-heap.json
4+
dhat-heap.json

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
"cwd": "${workspaceFolder}"
3131
},
3232
]
33-
}
33+
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"files.trimFinalNewlines": true,
55
"files.trimTrailingWhitespace": true,
66
"files.trimTrailingWhitespaceInRegexAndStrings": true
7-
}
7+
}

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Note: The built-in formatter is not stylua, but emmyluacodestyle. This feature s
9393
---@param f1 fun(...: T...): any
9494
---@param ... T...
9595
function invoke(f1, ...)
96-
96+
9797
end
9898

9999
invoke(function(a, b, c) -- infer as: integer, integer, integer
@@ -279,7 +279,7 @@ Also supports immutability checks for iterator variables in for loop statements.
279279
## [0.8.0] - 2025-5-30
280280

281281
### ✨ Added
282-
- **New Standard Types**:
282+
- **New Standard Types**:
283283
- `std.Unpack` type for better `unpack` function inference
284284
- `std.Rawget` type for better `rawget` function inference
285285
- **Generator Support**: Implementation similar to `luals`
@@ -397,7 +397,7 @@ Global configuration have less priority than the local one
397397
- **Flow Analyze Algorithm**: Refactor flow analyze algorithm
398398

399399
### 🐛 Fixed
400-
- **Self Inference**: Fix some self infer issue
400+
- **Self Inference**: Fix some self infer issue
401401
- **Diagnostic Action**: Fix some diagnostic action issue
402402
- **Type Check and Completion**: Optimize some type check and completion
403403

@@ -429,7 +429,7 @@ Global configuration have less priority than the local one
429429

430430
### ✨ Added
431431
- **Re-index Control**: Disable re-index in default, need to enable by `workspace.enableReindex`
432-
- **New Diagnostics**: Add New Diagnostics `inject_field`, `missing_fields`, `redefined_local`, `undefined_field`, `inject-field`, `missing-global-doc`,
432+
- **New Diagnostics**: Add New Diagnostics `inject_field`, `missing_fields`, `redefined_local`, `undefined_field`, `inject-field`, `missing-global-doc`,
433433
`incomplete-signature-doc`, `circle-doc-class`, `assign-type-mismatch`, `unbalanced_assignments`, `check_return_count`, `duplicate_require`, `circle_doc_class`, `incomplete_signature_doc`, `unnecessary_assert`
434434
- **Boolean Type Support**: Support `true` and `false` as type
435435
- **Compact Fun Return Syntax**: Compact luals fun return syntax like: `(name: string, age: number)`
@@ -497,7 +497,7 @@ Global configuration have less priority than the local one
497497
```
498498
- **Enum Type Check Fix**: Fix enum type check
499499
- **Custom Operator Infer Fix**: Fix custom operator infer
500-
- **Select Function Fix and Std.Select Type Addition**: Fix select function and add std.Select type
500+
- **Select Function Fix and Std.Select Type Addition**: Fix select function and add std.Select type
501501
- **Union Type Refactor**: Refactor Union type
502502
- **Description Support for Type**: Add description to type
503503
- **Multi Union Description Support**: Support description without '#' on multi union
@@ -541,7 +541,7 @@ Global configuration have less priority than the local one
541541

542542
---
543543

544-
## [0.4.6]
544+
## [0.4.6]
545545

546546
### 🐛 Fixed
547547
- **Executable File Directory Hierarchy Issue**: Fix issue with executable file directory hierarchy being too deep.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ emmylua_diagnostic_macro = { path = "crates/emmylua_diagnostic_macro", version =
1515
# external
1616
lsp-server = "0.7.7"
1717
tokio = { version = "1.46", features = ["full"] }
18-
serde = { version = "1.0.219", features = ["derive"] }
18+
serde = { version = "1.0.219", features = ["derive"] }
1919
serde_json = "1.0.141"
2020
rowan = { version = "0.16.1" }
2121
notify = { version = "8.1.0", features = ["serde"] }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# EmmyLua Code Analysis
22

3-
EmmyLua Code Analysis is a static analysis tool for Lua code. It can be used to analyze Lua code and provide code completion, type checking, and other features in IDEs.
3+
EmmyLua Code Analysis is a static analysis tool for Lua code. It can be used to analyze Lua code and provide code completion, type checking, and other features in IDEs.

crates/emmylua_code_analysis/locales/codestyle.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@ codestyle.NonLiteralExpressionsInAssert:
44
Using an assert call with an expensive (non-literal) message expression may cause serious performance regressions.
55
The assert macro is only allowed if the error message is a fixed string literal.
66
Please refactor your code to separate the condition check and error handling.
7-
7+
88
Instead of:
99
local a = assert(foo(), expensive_msg_expression)
10-
10+
1111
Use one of the following forms:
1212
local a = foo()
1313
if not a then
1414
error(expensive_msg_expression)
1515
end
16-
17-
16+
17+
1818
zh_CN: |
1919
使用 assert 调用时,如果错误信息参数是个昂贵的计算表达式(非字面量),可能会引起严重的性能回归。
2020
assert 宏仅允许错误信息为硬编码的字符串字面量。
2121
请重构代码,将条件判断与错误处理分离。
22-
22+
2323
例如,将:
2424
local a = assert(foo(), expensive_msg_expression)
25-
25+
2626
修改为:
2727
local a = foo()
2828
if not a then
2929
error(expensive_msg_expression)
3030
end
31-
31+
3232
zh_HK: |
3333
當使用 assert 調用時,如果錯誤信息參數是一個耗資昂貴的計算表達式(非字面量),可能會引起嚴重的性能回歸。
3434
assert 語句僅允許錯誤信息為硬編碼的字串字面量。
3535
請重構代碼,將條件檢查與錯誤處理分離。
36-
36+
3737
例如,將:
3838
local a = assert(foo(), expensive_msg_expression)
39-
39+
4040
修改爲:
41-
41+
4242
local a = foo()
4343
if not a then
4444
error(expensive_msg_expression)
45-
end
45+
end

crates/emmylua_code_analysis/locales/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,4 @@ Cannot use `...` outside a vararg function.:
272272
"Value '%{value}' does not match any enum value. Expected one of: %{enum_values}":
273273
en: "Value '%{value}' does not match any enum value. Expected one of: %{enum_values}"
274274
zh_CN: "值 '%{value}' 与任何枚举值都不匹配。应为以下之一: %{enum_values}"
275-
zh_HK: "值 '%{value}' 與任何枚舉值都不匹配。應為以下之一: %{enum_values}"
275+
zh_HK: "值 '%{value}' 與任何枚舉值都不匹配。應為以下之一: %{enum_values}"

0 commit comments

Comments
 (0)