Skip to content

Commit

Permalink
fix(ci): attempt to make golangci-lint work on only new code
Browse files Browse the repository at this point in the history
  • Loading branch information
emil14 committed Feb 22, 2024
1 parent 2e8b94f commit d1ea4da
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 14 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
name: golangci-lint
on:
push:
branches:
- main
pull_request:

permissions:
contents: read
pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.51.0
version: v1.54.0
only-new-issues: true
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run:
skip-dirs:
- pkg/ir
timeout: 1m
timeout: 5m

linters:
enable-all: true
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ lsp:
.PHONY: tygo
tygo:
@tygo generate

# lint go code
.PHONY: lint
lint:
@golangci-lint run ./... --new-from-rev=HEAD~1
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ component Main(start any) (stop any) {

- Flow-Based Programming
- Effortless Concurrency
- Static Type System
- Strong Static Typing
- Multi-Target Compilation
- Simple and Clean C-like Syntax
- Clean C-like Syntax
- Interpreter Mode
- First-Class Dependency Injection
- Builtin Observability
- Garbage Collection
- Visual Programming (WIP)
- Go Interop (WIP)
- No Runtime Exceptions (WIP)

### WIP

- Visual Programming
- Go Interop
- No Runtime Exceptions

[Read more about the language](https://nevalang.org/docs/about)

Expand All @@ -41,4 +44,4 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) and [ARCHITECTURE.md](./ARCHITECTURE.md

---

> ⚠️ WARNING: This project is under **heavy** development and not production ready yet.
> ⚠️ WARNING: This project is under heavy development and **not production ready** yet.
4 changes: 2 additions & 2 deletions cmd/lsp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
_ "github.com/tliron/commonlog/simple"
"github.com/tliron/glsp/server"

"github.com/nevalang/neva/cmd/language-server/indexer"
lspServer "github.com/nevalang/neva/cmd/language-server/server"
"github.com/nevalang/neva/cmd/lsp/indexer"
lspServer "github.com/nevalang/neva/cmd/lsp/server"
"github.com/nevalang/neva/internal/compiler/analyzer"
"github.com/nevalang/neva/internal/compiler/desugarer"
"github.com/nevalang/neva/internal/compiler/parser"
Expand Down
2 changes: 1 addition & 1 deletion cmd/lsp/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"sync"

"github.com/nevalang/neva/cmd/language-server/indexer"
"github.com/nevalang/neva/cmd/lsp/indexer"
"github.com/nevalang/neva/pkg"
"github.com/tliron/commonlog"
"github.com/tliron/glsp"
Expand Down
2 changes: 1 addition & 1 deletion cmd/lsp/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16"

"github.com/nevalang/neva/cmd/language-server/indexer"
"github.com/nevalang/neva/cmd/lsp/indexer"
"github.com/nevalang/neva/internal/compiler"
src "github.com/nevalang/neva/pkg/sourcecode"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pkg

// Current version of the language and stdlib

Check failure on line 3 in pkg/version.go

View workflow job for this annotation

GitHub Actions / lint

comment on exported var `Version` should be of the form `Version ...` (golint)
var Version = "0.4.1"
var Version = "0.5.1" //nolint:gochecknoglobals

0 comments on commit d1ea4da

Please sign in to comment.