Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/dependabot.yml

This file was deleted.

59 changes: 7 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,22 @@
---
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
workflow_dispatch: {}
schedule:
- cron: 0 0 * * 1

permissions:
contents: read
pull-requests: read

jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- '1.21'
- '1.22'

permissions:
checks: write
contents: read
pull-requests: read

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ matrix.go }}

- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v3.7.1
if: github.event_name == 'pull_request'
with:
only-new-issues: true

- name: Test
run: go test -v -coverprofile=cover.out ./...

- name: Send coverage
uses: shogo82148/actions-goveralls@25f5320d970fb565100cf1993ada29be1bb196a1 # v1.10.0
with:
path-to-profile: cover.out
flag-name: Go-${{ matrix.go }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest

permissions:
checks: write

steps:
- uses: shogo82148/actions-goveralls@25f5320d970fb565100cf1993ada29be1bb196a1 # v1.10.0
with:
parallel-finished: true
golang-checks:
name: Golang checks
uses: bodgit/workflows/.github/workflows/golang-checks.yml@90676a57fa5e7bb53dbea051211751b225ee60ca # v1.0.1
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
---
name: Track releases

on:
push:
branches:
- main

permissions:
contents: read
permissions: {}

jobs:
release-please:
runs-on: ubuntu-latest

steps:
- name: Run release-please
uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
with:
token: ${{ secrets.RELEASE_TOKEN }}
name: Run release-please
uses: bodgit/workflows/.github/workflows/release.yml@90676a57fa5e7bb53dbea051211751b225ee60ca # v1.0.1
secrets:
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/github/bodgit/sevenzip/badge.svg?branch=main)](https://coveralls.io/github/bodgit/sevenzip?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/bodgit/sevenzip)](https://goreportcard.com/report/github.com/bodgit/sevenzip)
[![GoDoc](https://godoc.org/github.com/bodgit/sevenzip?status.svg)](https://godoc.org/github.com/bodgit/sevenzip)
![Go version](https://img.shields.io/badge/Go-1.22-brightgreen.svg)
![Go version](https://img.shields.io/badge/Go-1.21-brightgreen.svg)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/bodgit/sevenzip)

# sevenzip

Expand Down
2 changes: 1 addition & 1 deletion internal/bra/bcj.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (c *bcj) Convert(b []byte, encoding bool) int {

if mask != 0 {
sh := mask & 6 << 2
if test86MSByte(byte(v >> sh)) {
if test86MSByte(byte(v >> sh)) { //nolint:gosec
v ^= (uint32(0x100) << sh) - 1
if encoding {
v += cur
Expand Down
2 changes: 1 addition & 1 deletion struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (si *streamsInfo) folderReader(r io.ReaderAt, folder int, password string)
err error
)

out[output], isEncrypted, err = f.coderReader(in[input:input+c.in], uint64(i), password) //nolint:gosec
out[output], isEncrypted, err = f.coderReader(in[input:input+c.in], uint64(i), password)
if err != nil {
return nil, 0, hasEncryption, err
}
Expand Down
Loading