-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic linting with GitHub Actions
- Loading branch information
1 parent
a8421ab
commit b3347a5
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
base: lua52 | ||
|
||
globals: | ||
package.cpath: | ||
removed: true | ||
collectgarbage: | ||
removed: true | ||
_HOST: | ||
property: read-only | ||
_CC_DEFAULT_SETTINGS: | ||
property: read-only | ||
_CC_DISABLE_LUA51_FEATURES: | ||
property: read-only | ||
sleep: | ||
property: read-only | ||
args: | ||
- type: number | ||
required: true | ||
write: | ||
property: read-only | ||
args: | ||
- type: string | ||
required: true | ||
printError: | ||
property: read-only | ||
args: | ||
- type: "..." | ||
required: true | ||
read: | ||
property: read-only | ||
args: | ||
- type: string | ||
required: false | ||
- type: table | ||
required: false | ||
- type: function | ||
required: false | ||
- type: string | ||
required: false | ||
colors: | ||
property: read-only | ||
colours: | ||
property: read-only | ||
commands: | ||
property: read-only | ||
disk: | ||
property: read-only | ||
fs: | ||
property: read-only | ||
gps: | ||
property: read-only | ||
help: | ||
property: read-only | ||
http: | ||
property: read-only | ||
io: | ||
property: read-only | ||
keys: | ||
property: read-only | ||
multishell: | ||
property: read-only | ||
os: | ||
property: read-only | ||
paintutils: | ||
property: read-only | ||
parallel: | ||
property: read-only | ||
peripheral: | ||
property: read-only | ||
pocket: | ||
property: read-only | ||
rednet: | ||
property: read-only | ||
redstone: | ||
property: read-only | ||
settings: | ||
property: read-only | ||
shell: | ||
property: read-only | ||
term: | ||
property: read-only | ||
textutils: | ||
property: read-only | ||
turtle: | ||
property: read-only | ||
vector: | ||
property: read-only | ||
window: | ||
property: read-only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
paths: ["**.lua", ".github/workflows/lint.yaml"] | ||
pull_request: | ||
paths: ["**.lua", ".github/workflows/lint.yaml"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint-selene: | ||
name: Lint Lua with Selene | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: NTBBloodbath/selene-action@v1.0.0 | ||
with: | ||
# Github secret token | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# selene arguments | ||
args: . --config .selene.toml | ||
# selene version | ||
version: 0.23.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
std = ".cc-tweaked.selene" | ||
exclude = ["./unicorn/semver.lua"] | ||
|
||
[lints] | ||
incorrect_standard_library_use = "allow" # Workaround for https://github.com/Kampfkarren/selene/issues/467 |