ci: add luacheck workflow and improve stylua; add luacheckrc config
This commit is contained in:
parent
4742e3a251
commit
f04aed8e96
8 changed files with 45 additions and 54 deletions
18
.github/workflows/luacheck.yaml
vendored
Normal file
18
.github/workflows/luacheck.yaml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# Lint Lua code
|
||||
name: Luacheck
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: lunarmodules/luacheck@v1
|
||||
with:
|
||||
args: .
|
||||
21
.github/workflows/stylua.yaml
vendored
21
.github/workflows/stylua.yaml
vendored
|
|
@ -1,29 +1,22 @@
|
|||
---
|
||||
# Check Lua Formatting
|
||||
name: Check Lua Formatting in MyRepo
|
||||
name: StyLua
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
stylua-check:
|
||||
name: Stylua Check
|
||||
stylua:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Stylua Check
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: JohnnyMorganz/stylua-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
|
|
|
|||
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
|
|
@ -1,8 +0,0 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="dict.database" />
|
||||
<option value="search_engine" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.11" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
20
.luacheckrc
Normal file
20
.luacheckrc
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- Neovim globals and std
|
||||
std = "lua51+vim"
|
||||
|
||||
-- Globals provided by Neovim
|
||||
read_globals = {
|
||||
"vim",
|
||||
}
|
||||
|
||||
-- Ignore max line length warnings
|
||||
ignore = {
|
||||
"631", -- max_line_length
|
||||
}
|
||||
|
||||
-- Don't report unused self arguments in methods
|
||||
self = false
|
||||
|
||||
-- Exclude third-party code
|
||||
exclude_files = {
|
||||
"lua/custom/plugins/lazy.lua",
|
||||
}
|
||||
Loading…
Reference in a new issue