Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create lint workflow #32

Merged
merged 4 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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