Skip to content

Commit

Permalink
Update golangci-lint to v1.33.0
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 6, 2020
1 parent 1b667ab commit dc07443
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32.0
version: v1.33.0
release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ linters:
- nestif
- nlreturn
- noctx
- paralleltest
- testpackage
- wrapcheck
- wsl
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOLANGCI_LINT_VERSION=1.32
GOLANGCI_LINT_VERSION=1.33

.PHONY: default
default: generate run test lint format
Expand Down
2 changes: 2 additions & 0 deletions cmd/data_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func getKernelInfo(fs vfs.FS) (map[string]string, error) {

// getOSRelease returns the operating system identification data as defined by
// https://www.freedesktop.org/software/systemd/man/os-release.html.
//nolint:godot
func getOSRelease(fs vfs.FS) (map[string]string, error) {
for _, filename := range []string{"/usr/lib/os-release", "/etc/os-release"} {
f, err := fs.Open(filename)
Expand Down Expand Up @@ -79,6 +80,7 @@ func maybeUnquote(s string) string {

// parseOSRelease parses operating system identification data from r as defined
// by https://www.freedesktop.org/software/systemd/man/os-release.html.
//nolint:godot
func parseOSRelease(r io.Reader) (map[string]string, error) {
result := make(map[string]string)
s := bufio.NewScanner(r)
Expand Down
2 changes: 2 additions & 0 deletions internal/chezmoi/targetstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,10 @@ func (ts *TargetState) importHeader(r io.Reader, importTAROptions ImportTAROptio
targetPath = filepath.Join(strings.Split(targetPath, string(os.PathSeparator))[importTAROptions.StripComponents:]...)
}
if importTAROptions.DestinationDir != "" {
//nolint:gosec
targetPath = filepath.Join(importTAROptions.DestinationDir, targetPath)
} else {
//nolint:gosec
targetPath = filepath.Join(ts.DestDir, targetPath)
}
targetName, err := filepath.Rel(ts.DestDir, targetPath)
Expand Down
1 change: 1 addition & 0 deletions internal/git/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func (e ParseError) Error() string {
// ParseStatusPorcelainV2 parses the output of
// git status --ignored --porcelain=v2
// See https://git-scm.com/docs/git-status.
//nolint:godot
func ParseStatusPorcelainV2(output []byte) (*Status, error) {
status := &Status{}
s := bufio.NewScanner(bytes.NewReader(output))
Expand Down

0 comments on commit dc07443

Please sign in to comment.