https://github.com/manuelarte/presentation-create-your-first-linter
Presentation about creating your first linter.
https://github.com/manuelarte/presentation-create-your-first-linter
go golang golangci golangci-lint guide linter meetup plugin tutorial
Last synced: 3 months ago
JSON representation
Presentation about creating your first linter.
- Host: GitHub
- URL: https://github.com/manuelarte/presentation-create-your-first-linter
- Owner: manuelarte
- License: mit
- Created: 2025-11-09T19:25:28.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-14T07:36:23.000Z (3 months ago)
- Last Synced: 2026-01-14T11:25:09.032Z (3 months ago)
- Topics: go, golang, golangci, golangci-lint, guide, linter, meetup, plugin, tutorial
- Language: JavaScript
- Homepage: https://manuelarte.github.io/presentation-create-your-first-linter/
- Size: 41.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create Your First Linter
Here I have the content to give the presentation about how to create your first linter.
The goal of this presentation is to create a linter, and run:
- standalone
- inside [golangci-lint][golangci]
🔗[Link to the presentation][5]
## Tools
- I am using [reveal.js][2] to create the slides.
To start the slides, inside the [./slides/](./slides/) folder, run:
```bash
npm start
```
## Go Projects
### Ast Example
Example on how the AST looks like for a small .go file
```bash
cd astexample && make t
```
### Unexported Constants Check
Exercise to implement uber style guideline [Prefix Unerxported Globals with _](https://github.com/uber-go/guide/blob/master/style.md#prefix-unexported-globals-with-_).
BadGood
```go
// foo.go
const (
defaultPort = 8080
defaultUser = "user"
)
// bar.go
func Bar() {
defaultPort := 9090
...
fmt.Println("Default port", defaultPort)
// We will not see a compile error if the first line of
// Bar() is deleted.
}
```
```go
// foo.go
const (
_defaultPort = 8080
_defaultUser = "user"
)
```
To implement: [analyzer.go](./unexportedconstantscheck/analyzer.go)
### Custom Module
Small web app to run [custom plugin linters][4].
[golangci]: https://golangci-lint.run/
[2]: https://revealjs.com/
[3]: https://github.com/jj-vcs/jj
[4]: https://golangci-lint.run/plugins/module-plugins/
[5]: https://manuelarte.github.io/presentation-create-your-first-linter/