Skip to content

Conversation

@anonymort
Copy link
Contributor

Summary

  • Add .golangci.yml configuration enabling govet, staticcheck, errcheck, gosimple, ineffassign, unused, gofmt, and goimports linters
  • Update scripts/check.sh to run golangci-lint with go vet fallback
  • Update CI workflow to install golangci-lint in both format and quality jobs
  • Add golangci-lint to CONTRIBUTING.md setup instructions

Changes

File Description
.golangci.yml New linter configuration with sensible defaults
scripts/check.sh Added golangci-lint step (step 3) with go vet fallback
.github/workflows/check.yml Added golangci-lint install and Go setup in CI jobs
CONTRIBUTING.md Updated setup instructions to include golangci-lint

Details

  • Linters enabled: govet, staticcheck, errcheck, gosimple, ineffassign, unused, gofmt, goimports
  • Sensible exclusions for test files and common patterns (os.Remove, deferred Close calls)
  • Falls back to go vet if golangci-lint is not installed locally
  • Updated cache keys in CI to include golangci-lint binaries

Test plan

  • CI passes on this PR
  • Local ./scripts/check.sh runs without errors

JackPhallen and others added 30 commits January 4, 2026 21:33
should_protect_path will always be available as it comes from common.sh.
This check adds a lot of overhead as it runs on every file.
…on with new sponsorship and contribution information.
Use single quotes, otherwise this expands now rather than
when signalled.
tw93 and others added 17 commits January 5, 2026 13:20
…-command-check

chore: Do not check if should_protect_path exists
… installer display names by stripping hash prefixes.
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 7.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](stefanzweifel/git-auto-commit-action@v5...v7)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Fixes tw93#263

- Change regex from \.\. to (^|/)\.\.(/|$) to only match path components
- Firefox uses ..files suffix in IndexedDB dirs (e.g., name..files)
- Still blocks actual traversal: /tmp/../etc
- Added test cases for Firefox compatibility
- All 16 tests passing
- Add .golangci.yml configuration enabling govet, staticcheck, errcheck,
  gosimple, ineffassign, unused, gofmt, and goimports linters
- Update scripts/check.sh to run golangci-lint with go vet fallback
- Update CI workflow to install golangci-lint in both format and quality jobs
- Add golangci-lint to CONTRIBUTING.md setup instructions

Sensible exclusions configured for test files and common patterns
(os.Remove, deferred Close calls).
@tw93
Copy link
Owner

tw93 commented Jan 6, 2026

@anonymort It seems that the code you submitted has some historical issues. Try submitting only the code you have modified. It should be that the code needs to be synchronized to the latest first, and then submitted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This configuration file targets Golangci-lint v1, which is deprecated and incompatible with v2. We should use the latest version (v2.7.2) instead. See https://golangci-lint.run/

@JackPhallen
Copy link
Contributor

@JackPhallen It seems that the code you submitted has some historical issues. Try submitting only the code you have modified. It should be that the code needs to be synchronized to the latest first, and then submitted.

Did you intend to tag me?

@tw93
Copy link
Owner

tw93 commented Jan 7, 2026

@JackPhallen sorry 😞 I made a mistake

@tw93 tw93 closed this in 0cc2052 Jan 8, 2026
@tw93
Copy link
Owner

tw93 commented Jan 8, 2026

I recently made some modifications myself, thank you for submitting the contribution code.
@anonymort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants