Skip to content

Commit

Permalink
Added a linting job that triggers on PR events (#28)
Browse files Browse the repository at this point in the history
* Added a linting job that triggers on PR events

* Fixed linting issues

* Readded exit with code 1 when releaing terminal does not error out

* Refactored dependency steps into 1

* Removed else clause to default to os.Exit
  • Loading branch information
MitchellBerend authored Nov 9, 2023
1 parent f2f682b commit 0b2cfb2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Linting

on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.1'

- name: Install dependencies
run: |
go mod tidy
go mod download

- name: Run golangci-lint
uses: golangci/[email protected]

4 changes: 3 additions & 1 deletion cmd/program/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ var (
func (p *Project) ExitCLI(tprogram *tea.Program) {
if p.Exit {
// logo render here
tprogram.ReleaseTerminal()
if err := tprogram.ReleaseTerminal(); err != nil {
log.Fatal(err)
}
os.Exit(1)
}
}
Expand Down
4 changes: 0 additions & 4 deletions cmd/ui/multiInput/multiInput.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import (
"github.com/charmbracelet/lipgloss"
)

const (
bullet = "•"
)

// Change this
var (
focusedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#01FAC6")).Bold(true)
Expand Down

0 comments on commit 0b2cfb2

Please sign in to comment.