From 45a215d32fd2a3518466396456327e8d6c811c3e Mon Sep 17 00:00:00 2001 From: Valentin David Date: Thu, 19 Sep 2024 11:50:15 +0200 Subject: [PATCH] .golangci.yml: verify for forbidden use of os/user --- .golangci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 33ff97d445e4..71a0cecb78ee 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -121,11 +121,15 @@ linters-settings: min-len: 3 # minimal occurrences count to trigger, 3 by default min-occurrences: 3 - # depguard: - # list-type: blacklist - # include-go-root: false - # packages: - # - github.com/davecgh/go-spew/spew + depguard: + rules: + osuser: + files: + - "!**/osutil/user/*.go" + deny: + - pkg: "os/user" + desc: "Please use osutil/user instead. See https://github.com/canonical/snapd/pull/13776" + misspell: # Correct spellings using locale preferences for US or UK. # Default is to use a neutral variety of English.