Skip to content

manuelarte/presentation-golangci-lint

Repository files navigation

Presentation golangci-lint

Here I have the content to give the presentation about golangci-lint

🔗Link to the presentation

Tools

  • I am using reveal.js to create the slides.
  • I am using Jujutsu as a version control.

To start the slides, inside the ./slides/ folder, run:

npm start

Go Projects

Ast Example

Example on how the AST looks like for a small .go file

cd astexample && make t

Unexported Constants Check

Exercise to implement uber style guideline Prefix Unerxported Globals with _.

BadGood
// 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.
}
// foo.go

const (
  _defaultPort = 8080
  _defaultUser = "user"
)

To implement: analyzer.go

Custom Module

Small web app to run custom plugin linters.

TODO

  • Improve slides

About

Presentation about golangci-lint.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published