Fernandez Ludovic's Avatar

Fernandez Ludovic

@ldez.dev.bsky.social

I'm a community-funded open-source developer. Core maintainer of Golangci-lint, go-acme/lego, and some open-source projects you may be using πŸ˜‰

132 Followers  |  26 Following  |  17 Posts  |  Joined: 24.06.2024  |  1.6047

Latest posts by ldez.dev on Bluesky

Video thumbnail

We often focus on binary size, but do you know the size of the files inside the module cache for your project?
On a CI, this may lead you to "no space left on device"
I created a small tool to calculate module cache size for a module.

github.com/ldez/gomodca...

#golang

25.04.2025 11:30 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

BREAKING.

From a reliable source. MITRE support for the CVE program is due to expire tomorrow. The attached letter was sent out to CVE Board Members.

15.04.2025 17:23 β€” πŸ‘ 695    πŸ” 420    πŸ’¬ 38    πŸ“Œ 207
Preview
Welcome to golangci-lint v2 I am thrilled to announce the release of v2! I hope is that these features will enhance your development experience.

I am thrilled to announce the release of golangci-lint v2!

ldez.github.io/blog/2025/03...

#golang #golangcilint

24.03.2025 12:46 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 1    πŸ“Œ 1
Golangci-lint financial report.

January 2025

Golangci-lint financial report. January 2025

Golangci-lint financial report.

github.com/golangci/gol...

#golang #golangcilint

27.01.2025 13:15 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 1
Preview
πŸͺ© It's time to create a v2 πŸš€ Β· Issue #5300 Β· golangci/golangci-lint There are at least 6 years since the idea of a v2 is here, we should pass this step now. ImportantThe focus will be on structural configuration changes and default values changes only (and removing...

It's time for a v2 of golangci-lint!

github.com/golangci/gol...

#golang #golangcilint

06.01.2025 11:31 β€” πŸ‘ 8    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0
Preview
Changelog | golangci-lint Fast Go linters runner golangci-lint.

Happy New Year πŸŽ‰
New release (v1.63.0) of golangci-lint!

What's new?
golangci-lint.run/product/chan...

#golang #golangci-lint

01.01.2025 13:59 β€” πŸ‘ 10    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

πŸ€” maybe It works but it need to be uploaded with video button.

09.12.2024 15:12 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
run with

run with

Post image

I missed that gif doesn't work on Bluesky

09.12.2024 15:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image linters:
  enable:
    - usetesting

linters-settings:
  usetesting:
    # Detects usage of `os.Chdir()`
    # Disabled if Go < 1.24.
    os-chdir: true

    # Detects usage of `context.Background()`
    # Disabled if Go < 1.24.
    context-background: true

    # Detects usage of `context.TODO()`
    # Disabled if Go < 1.24.
    context-todo: true

linters: enable: - usetesting linters-settings: usetesting: # Detects usage of `os.Chdir()` # Disabled if Go < 1.24. os-chdir: true # Detects usage of `context.Background()` # Disabled if Go < 1.24. context-background: true # Detects usage of `context.TODO()` # Disabled if Go < 1.24. context-todo: true

Bonus: this linter is go1.24 ready ✨

09.12.2024 12:13 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
> ./golangci-lint run example_test.go:41:18: os.CreateTemp("", ...) could be replaced by os.CreateTemp(t.TempDir(), ...) in TestSample (usetesting) tmpFile, err := os.CreateTemp("", pattern) example_test.go:46:17: os.MkdirTemp() could be replaced by t.TempDir() in TestSample (usetesting) tmpDir, err := os.MkdirTemp("", pattern) example_test.go:51:17: os.TempDir() could be replaced by t.TempDir() in TestSample (usetesting) otherTmpDir := os.TempDir() >

> ./golangci-lint run example_test.go:41:18: os.CreateTemp("", ...) could be replaced by os.CreateTemp(t.TempDir(), ...) in TestSample (usetesting) tmpFile, err := os.CreateTemp("", pattern) example_test.go:46:17: os.MkdirTemp() could be replaced by t.TempDir() in TestSample (usetesting) tmpDir, err := os.MkdirTemp("", pattern) example_test.go:51:17: os.TempDir() could be replaced by t.TempDir() in TestSample (usetesting) otherTmpDir := os.TempDir() >

linters:
  enable:
    - usetesting

linters-settings:
  usetesting:
    # Detects usage of `os.CreateTemp("", ...)`
    os-create-temp: true

    # Detects usage of `os.MkdirTemp()`
    os-mkdir-temp: true

    # Detects usage of `os.TempDir()`
    os-temp-dir: true

linters: enable: - usetesting linters-settings: usetesting: # Detects usage of `os.CreateTemp("", ...)` os-create-temp: true # Detects usage of `os.MkdirTemp()` os-mkdir-temp: true # Detects usage of `os.TempDir()` os-temp-dir: true

I created a new linter to detect calls which can be replaced by methods from the testing package.
github.com/ldez/usetest...

This new linter will be available in the next version of golangci-lint (v1.63).

Support my work: bento.me/ldez

#golang #golangcilint

09.12.2024 12:13 β€” πŸ‘ 6    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0
Preview
Discrepancy between what's in GitHub and what's been published to PyPI for v8.3.41 Β· Issue #18027 Β· ultralytics/ultralytics Bug Code in the published wheel 8.3.41 is not what's in GitHub and appears to invoke mining. Users of ultralytics who install 8.3.41 will unknowingly execute an xmrig miner. Examining the file util...

in computer news: lol, lmao

github.com/ultralytics/...

it looks like github actions got tricked into running bash through a malicious branch name

which was used to ship mining malware inside python packages

incredible

06.12.2024 14:04 β€” πŸ‘ 119    πŸ” 33    πŸ’¬ 3    πŸ“Œ 5

Great! My PR about publishing AUR from sources (not '-bin') has been merged into #GoReleaser, I can't wait to be able to use it, this will save me time and simplify the release processes.
Thank you @caarlos0.dev ❀️

06.12.2024 01:58 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 1
> go mod edit -go=1.22
> ./golangci-lint run
go.mod:3:1: go directive (1.22) doesn't match the pattern '\d\.\d+\.0$' (gomoddirectives) go 1.22
> go mod edit -go=1.22.3
> ./golangci-lint run
go.mod:3:1: go directive (1.22.3) doesn't match the pattern '\d\.\d+\.0$' (gomoddirectives) go 1.22.3
> go mod edit -go=1.22.0
> ./golangci-lint run

> go mod edit -go=1.22 > ./golangci-lint run go.mod:3:1: go directive (1.22) doesn't match the pattern '\d\.\d+\.0$' (gomoddirectives) go 1.22 > go mod edit -go=1.22.3 > ./golangci-lint run go.mod:3:1: go directive (1.22.3) doesn't match the pattern '\d\.\d+\.0$' (gomoddirectives) go 1.22.3 > go mod edit -go=1.22.0 > ./golangci-lint run

linters:
  enable:
    - gomoddirectives

linters-settings:
  gomoddirectives:
    # Defines a pattern to validate `go` directive.
    go-version-pattern: '\d\.\d+\.0$'

linters: enable: - gomoddirectives linters-settings: gomoddirectives: # Defines a pattern to validate `go` directive. go-version-pattern: '\d\.\d+\.0$'

I added an option to the `gomoddirectives` linter: it forces the usage of patch 0 (ex: 1.22.0) or go family (ex 1.22) as min go version.

github.com/ldez/gomoddi...

This feature will be available in the next version of golangci-lint (v1.63).

Support my work: bento.me/ldez

#golang #golangcilint

04.12.2024 13:03 β€” πŸ‘ 2    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Output of the golangci-lint command

Output of the golangci-lint command

Example of linter configuration:

linters:
  enable:
    - tagliatelle

linters-settings:
  tagliatelle:
    case:
      rules:
        json: camel
      overrides:
        # Ignore a package.
        - pkg: my/pkg
          ignore: true
        # Use different rules by package.
        - pkg: my/otherpkg
          rules:
            json: snake

Example of linter configuration: linters: enable: - tagliatelle linters-settings: tagliatelle: case: rules: json: camel overrides: # Ignore a package. - pkg: my/pkg ignore: true # Use different rules by package. - pkg: my/otherpkg rules: json: snake

I updated `tagliatelle` linter, you can now define the naming rules of struct tags by package.

github.com/ldez/tagliat...

This new feature will be available in the next version of golangci-lint (v1.63).

Sponsor my work: bento.me/ldez

#golang #golangcilint

03.12.2024 17:02 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

merci

02.12.2024 21:10 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

thank you

02.12.2024 18:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0


If you are using some of the projects I maintain, then click on the link bento.me/ldez πŸ™
Each donation is important to me ❀️
Please, RT this message.

02.12.2024 15:57 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Starting today, my only source of revenue is community sponsoring for my OSS work.

Currently, it is far from enough to live on.
The next months will be difficult, but I need to do it.

My main focus will be on golangci-lint and go-acme/lego, I want to add new features.

02.12.2024 15:57 β€” πŸ‘ 8    πŸ” 4    πŸ’¬ 4    πŸ“Œ 0

A few months ago a user alerted us to the existence of a weird website: a domain squatting website but with a really weird approach.

Maybe you can help us.

1/5

25.11.2024 15:22 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

I learned something today: I was interacting with a Chinese contributor, and he was using "~" at the end of some sentences.
I thought it was related to a translation tool, but not at all.
The tilde is used at the end of sentences to convey a light, playful, or casual tone.

19.11.2024 17:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Changelog | golangci-lint Fast Go linters runner golangci-lint.

πŸŽ‰ New release (v1.62) of golangci-lint!
What's new?
golangci-lint.run/product/chan...
#golang #golangci-lint
πŸ‘‡

10.11.2024 19:46 β€” πŸ‘ 1    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0
Preview
How I published links inside the pkg.go.dev documentation of my module While hunting down a package on https://pkg.go.dev, I stumbled upon a delightful surprise in the β€œLinks” section: there are custom links!! What is this magic?

How I published links (and emojis) inside the pkg.go.dev documentation of my module / The missing documentation of pkg.go.dev

ldez.github.io/blog/2024/10...

#go #golang

28.10.2024 11:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Joke of the day, the answer of a DNS provider to their customers:
> We cannot provide an API that creates or deletes a DNS record, as this is a threat to the DNS itself.

18.09.2024 15:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - ldez/distributarepo: Helper to get an overview of the forks of a GitHub repository. Helper to get an overview of the forks of a GitHub repository. - ldez/distributarepo

It can be useful if you want to get an overview of the forks of a GitHub repository
github.com/ldez/distrib...

14.09.2024 12:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Invest in the sustainability of open-source software, and donate to golangci-lint!
Your generosity ensures we can continue to serve gophers worldwide.
- opencollective.com/golangci-lint
- github.com/sponsors/gol...
#golang #go #osssustainability

09.09.2024 16:16 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - gofrs/flock: Thread-safe file locking library in Go Thread-safe file locking library in Go. Contribute to gofrs/flock development by creating an account on GitHub.

I "unclogged" the module "github.com/gofrs/flock", so if you need a thread-safe file-locking library in Go, you can use it.
github.com/gofrs/flock
#golang #go

04.07.2024 17:19 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

@ldez.dev is following 20 prominent accounts