Skip to content

Commit 7cde4e6

Browse files
committed
Migrate gomodguard lint config
1 parent 15b8aa8 commit 7cde4e6

1 file changed

Lines changed: 84 additions & 83 deletions

File tree

.golangci.yml

Lines changed: 84 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ linters:
5353

5454
- gocognit
5555

56+
# Replaced by gomodguard_v2.
57+
- gomodguard
58+
5659
# We don't want to forbid TODO, FIXME, etc.
5760
- godox
5861

@@ -309,92 +312,90 @@ linters:
309312
toolchain-forbidden: true
310313
go-version-pattern: \d\.\d+(\.0)?
311314

312-
# IMPORTANT: gomodguard blocks _modules_, not arbitrary packages. Be
315+
# IMPORTANT: gomodguard_v2 blocks _modules_, not arbitrary packages. Be
313316
# sure to use the module path from the go.mod file for these.
314317
# See https://github.com/ryancurrah/gomodguard/issues/12
315-
gomodguard:
318+
gomodguard_v2:
316319
blocked:
317-
modules:
318-
- github.com/avct/uasurfer:
319-
recommendations:
320-
- github.com/xavivars/uasurfer
321-
reason: The original avct module appears abandoned.
322-
- github.com/BurntSushi/toml:
323-
recommendations:
324-
- github.com/pelletier/go-toml/v2
325-
reason: This library panics frequently on invalid input.
326-
- github.com/pelletier/go-toml:
327-
recommendations:
328-
- github.com/pelletier/go-toml/v2
329-
reason: This is an outdated version.
330-
- github.com/gofrs/uuid:
331-
recommendations:
332-
- github.com/google/uuid
333-
- github.com/gofrs/uuid/v5:
334-
recommendations:
335-
- github.com/google/uuid
336-
- github.com/satori/go.uuid:
337-
recommendations:
338-
- github.com/google/uuid
339-
- github.com/google/uuid:
340-
recommendations:
341-
- github.com/google/uuid
342-
- github.com/lib/pq:
343-
recommendations:
344-
- github.com/jackc/pgx
345-
reason: This library is no longer actively maintained.
346-
- github.com/neilotoole/errgroup:
347-
recommendations:
348-
- golang.org/x/sync/errgroup
349-
reason: This library can lead to subtle deadlocks in certain use cases.
350-
- github.com/pariz/gountries:
351-
reason: This library's data is not actively maintained. Use GeoInfo data.
352-
github.com/pkg/errors:
353-
recommendations:
354-
- errors
355-
reason: pkg/errors is no longer maintained.
356-
- github.com/RackSec/srslog:
357-
recommendations:
358-
- log/syslog
359-
reason: This library's data is not actively maintained.
360-
- github.com/ua-parser/uap-go:
361-
recommendations:
362-
- github.com/xavivars/uasurfer
363-
reason: The performance of this library is absolutely abysmal.
364-
- github.com/ugorji/go:
365-
recommendations:
366-
- encoding/json
367-
- github.com/mailru/easyjson
368-
reason: This library is poorly maintained. We should default to using encoding/json and use easyjson where performance really matters.
369-
- github.com/zeebo/assert:
370-
recommendations:
371-
- github.com/stretchr/testify/assert
372-
reason: Use github.com/stretchr/testify/assert
373-
- gopkg.in/yaml.v2:
374-
recommendations:
375-
- github.com/goccy/go-yaml
376-
reason: Not actively maintained.
377-
- gopkg.in/yaml.v3:
378-
recommendations:
379-
- github.com/goccy/go-yaml
380-
reason: Not actively maintained.
381-
- gotest.tools/v3:
382-
recommendations:
383-
- github.com/stretchr/testify/assert
384-
reason: Use github.com/stretchr/testify/assert
385-
- inet.af/netaddr:
386-
recommendations:
387-
- net/netip
388-
- go4.org/netipx
389-
reason: inet.af/netaddr has been deprecated.
390-
versions:
391-
- github.com/jackc/pgconn:
392-
reason: Use github.com/jackc/pgx/v5
393-
- github.com/jackc/pgtype:
394-
reason: Use github.com/jackc/pgx/v5
395-
- github.com/jackc/pgx:
396-
version: < 5.0.0
397-
reason: Use github.com/jackc/pgx/v5
320+
- module: github.com/avct/uasurfer
321+
recommendations:
322+
- github.com/xavivars/uasurfer
323+
reason: The original avct module appears abandoned.
324+
- module: github.com/BurntSushi/toml
325+
recommendations:
326+
- github.com/pelletier/go-toml/v2
327+
reason: This library panics frequently on invalid input.
328+
- module: github.com/pelletier/go-toml
329+
recommendations:
330+
- github.com/pelletier/go-toml/v2
331+
reason: This is an outdated version.
332+
- module: github.com/gofrs/uuid
333+
recommendations:
334+
- github.com/google/uuid
335+
- module: github.com/gofrs/uuid/v5
336+
recommendations:
337+
- github.com/google/uuid
338+
- module: github.com/satori/go.uuid
339+
recommendations:
340+
- github.com/google/uuid
341+
- module: github.com/google/uuid
342+
recommendations:
343+
- github.com/google/uuid
344+
- module: github.com/lib/pq
345+
recommendations:
346+
- github.com/jackc/pgx
347+
reason: This library is no longer actively maintained.
348+
- module: github.com/neilotoole/errgroup
349+
recommendations:
350+
- golang.org/x/sync/errgroup
351+
reason: This library can lead to subtle deadlocks in certain use cases.
352+
- module: github.com/pariz/gountries
353+
reason: This library's data is not actively maintained. Use GeoInfo data.
354+
- module: github.com/pkg/errors
355+
recommendations:
356+
- errors
357+
reason: pkg/errors is no longer maintained.
358+
- module: github.com/RackSec/srslog
359+
recommendations:
360+
- log/syslog
361+
reason: This library's data is not actively maintained.
362+
- module: github.com/ua-parser/uap-go
363+
recommendations:
364+
- github.com/xavivars/uasurfer
365+
reason: The performance of this library is absolutely abysmal.
366+
- module: github.com/ugorji/go
367+
recommendations:
368+
- encoding/json
369+
- github.com/mailru/easyjson
370+
reason: This library is poorly maintained. We should default to using encoding/json and use easyjson where performance really matters.
371+
- module: github.com/zeebo/assert
372+
recommendations:
373+
- github.com/stretchr/testify/assert
374+
reason: Use github.com/stretchr/testify/assert
375+
- module: gopkg.in/yaml.v2
376+
recommendations:
377+
- github.com/goccy/go-yaml
378+
reason: Not actively maintained.
379+
- module: gopkg.in/yaml.v3
380+
recommendations:
381+
- github.com/goccy/go-yaml
382+
reason: Not actively maintained.
383+
- module: gotest.tools/v3
384+
recommendations:
385+
- github.com/stretchr/testify/assert
386+
reason: Use github.com/stretchr/testify/assert
387+
- module: inet.af/netaddr
388+
recommendations:
389+
- net/netip
390+
- go4.org/netipx
391+
reason: inet.af/netaddr has been deprecated.
392+
- module: github.com/jackc/pgconn
393+
reason: Use github.com/jackc/pgx/v5
394+
- module: github.com/jackc/pgtype
395+
reason: Use github.com/jackc/pgx/v5
396+
- module: github.com/jackc/pgx
397+
version: < 5.0.0
398+
reason: Use github.com/jackc/pgx/v5
398399

399400
gosec:
400401
excludes:

0 commit comments

Comments
 (0)