Create lint workflow (#32)
* Create lint workflow * Update lint.yml * Lint fix * Update lint.yml Co-authored-by: github-action update-app-version <githubaction@githubaction.com>
This commit is contained in:
1 parent
743ce20c0e
commit
5822207397
3 files changed
+46
-5
No files matched your search
@@ -0,0 +1,41 @@
|
|||||||
|
name: Linter
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
|
||||||
|
- name: Configure repo
|
||||||
|
run: |
|
||||||
|
git config --local user.email "githubaction@githubaction.com"
|
||||||
|
git config --local user.name "github-action linter"
|
||||||
|
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run linter
|
||||||
|
run: npm run lint:fix
|
||||||
|
|
||||||
|
- name: Run formatter
|
||||||
|
run: npm run format:fix
|
||||||
|
|
||||||
|
- name: Commit & Push Changes
|
||||||
|
run: |
|
||||||
|
git add "." && git commit -m "Lint fix" --no-verify && git push || true
|
||||||
@@ -40,7 +40,7 @@ namespace Http
|
|||||||
response.source = Http.HttpResponseSource.GENERATED
|
response.source = Http.HttpResponseSource.GENERATED
|
||||||
|
|
||||||
connection.ws_upgrade = true
|
connection.ws_upgrade = true
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end function)
|
end function)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace TimeUtils
|
|||||||
if timeLeft > 1
|
if timeLeft > 1
|
||||||
result += "s"
|
result += "s"
|
||||||
end if
|
end if
|
||||||
return result
|
return result
|
||||||
end if
|
end if
|
||||||
|
|
||||||
timeLeft = timeLeft / 60.0
|
timeLeft = timeLeft / 60.0
|
||||||
@@ -40,7 +40,7 @@ namespace TimeUtils
|
|||||||
if timeLeft > 1
|
if timeLeft > 1
|
||||||
result += "s"
|
result += "s"
|
||||||
end if
|
end if
|
||||||
return result
|
return result
|
||||||
end if
|
end if
|
||||||
|
|
||||||
timeLeft = timeLeft / 60.0
|
timeLeft = timeLeft / 60.0
|
||||||
@@ -50,7 +50,7 @@ namespace TimeUtils
|
|||||||
if timeLeft > 1
|
if timeLeft > 1
|
||||||
result += "s"
|
result += "s"
|
||||||
end if
|
end if
|
||||||
return result
|
return result
|
||||||
else
|
else
|
||||||
timeLeft = timeLeft / 24.0
|
timeLeft = timeLeft / 24.0
|
||||||
timeLeft = Cint(timeLeft)
|
timeLeft = Cint(timeLeft)
|
||||||
@@ -58,7 +58,7 @@ namespace TimeUtils
|
|||||||
if timeLeft > 1
|
if timeLeft > 1
|
||||||
result += "s"
|
result += "s"
|
||||||
end if
|
end if
|
||||||
return result
|
return result
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user