Skip to content

Commit

Permalink
Merge pull request #521 from pterm/520-add-reviewdog-with-golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Jun 3, 2023
2 parents 245aa88 + 1963bf9 commit 340d6ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/golangci.yml
@@ -1,21 +1,16 @@
name: Code analysis


name: golangci-lint
on: [ push, pull_request ]
on: [pull_request]
jobs:
golangci:
if: "!contains(github.event.head_commit.message, 'autoupdate')"
name: lint
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
go-version: 1.18

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
fetch-depth: 0
- name: Linting with golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
version: latest
github_token: ${{ secrets.ACCESS_TOKEN }}
reporter: github-pr-review
2 changes: 1 addition & 1 deletion pterm.go
Expand Up @@ -77,7 +77,7 @@ func DisableStyling() {
DisableColor()
}

// RecalculateTerminalSize updates already initialized terminal dimensions. Has to be called after a termina resize to guarantee proper rendering. Applies only to new instances.
// RecalculateTerminalSize updates already initialized terminal dimensions. Has to be called after a terminal resize to guarantee proper rendering. Applies only to new instances.
func RecalculateTerminalSize() {
// keep in sync with DefaultBarChart
DefaultBarChart.Width = GetTerminalWidth() * 2 / 3
Expand Down

0 comments on commit 340d6ad

Please sign in to comment.