Skip to content

Commit

Permalink
Create lint workflow (#32)
Browse files Browse the repository at this point in the history
* Create lint workflow

* Update lint.yml

* Lint fix

* Update lint.yml

Co-authored-by: github-action update-app-version <githubaction@githubaction.com>
  • Loading branch information
iBicha and github-action update-app-version authored Dec 17, 2022
1 parent 743ce20 commit 5822207
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Http
response.source = Http.HttpResponseSource.GENERATED

connection.ws_upgrade = true

return true
end function)
end function
Expand Down
8 changes: 4 additions & 4 deletions src/source/utils/TimeUtils.bs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace TimeUtils
if timeLeft > 1
result += "s"
end if
return result
return result
end if

timeLeft = timeLeft / 60.0
Expand All @@ -40,7 +40,7 @@ namespace TimeUtils
if timeLeft > 1
result += "s"
end if
return result
return result
end if

timeLeft = timeLeft / 60.0
Expand All @@ -50,15 +50,15 @@ namespace TimeUtils
if timeLeft > 1
result += "s"
end if
return result
return result
else
timeLeft = timeLeft / 24.0
timeLeft = Cint(timeLeft)
result = `${timeLeft} day`
if timeLeft > 1
result += "s"
end if
return result
return result
end if
end function

Expand Down

0 comments on commit 5822207

Please sign in to comment.