tomarrell
Repos
73
Followers
111
Following
26

LBADD: An experimental, distributed SQL database

379
24

A Go linter to check that errors from external packages are wrapped

198
21

A simple, single binary, message queue.

125
7

Elias-Fano encoding implementation in Rust

27
5

Sensible 'gf' for Node Path Relative JS module resolution per project 🐿

23
2

Fast linters Runner for Go

11569
1088

Events

opened issue
Class selector missing result when child of `<template></template>`

When attempting to select an element as a child of a <template> tag, htmlq does not return the result.

The following snippet is a minimal reproducible example, and taken from the GitHub home page.

<template>
   <details-dialog>
      <div class="octocat-spinner"></div>
   </details-dialog>
</template>

When attempting to select the .octocat-spinner element, no results are returned.

$ cat github.com | htmlq '.octocat-spinner'

However, when you remove the surrounding template tags, the element is found.

Created at 3 days ago

Update kustomization.yaml

Created at 2 weeks ago

deploy: poker

Created at 2 weeks ago

deploy: poker

Created at 3 weeks ago

feat: update poker

Created at 3 weeks ago

chore: update everything

Created at 3 weeks ago

Update README.md

Created at 4 weeks ago

advanced lesson 2

Created at 4 weeks ago

beginners: add turtle lesson

Created at 1 month ago

feat: use arm time val

Created at 1 month ago

feat: expose evt channel

Created at 1 month ago

docs: update readme

Created at 1 month ago
issue comment
ignorePackageGlobs doesn't appear to be working

@hackerwins no worries, it should be out in the next release. The update PR has already been merged into golangci-lint https://github.com/golangci/golangci-lint/pull/3287

Created at 1 month ago
issue comment
ignorePackageGlobs doesn't appear to be working

I've just pushed release v2.7.0 which makes this configuration value apply to functions called through interfaces, hopefully making it a bit more intuitive. Let me know if you run into any further issues.

Cheers

Created at 1 month ago
create tag
tomarrell create tag v2.7.0
Created at 1 month ago
delete branch
tomarrell delete branch ignore-package-globs-interface
Created at 1 month ago

fix: check interface package against ignorePackageGlobs (#36)

Created at 1 month ago
closed issue
ignorePackageGlobs doesn't appear to be working

Hey, great tool! This has been really useful to track down places I can apply some new error context packages I've been working on to provide additional structured information to errors.

After applying error contexts across our project I noticed a few places where it was unnecessary so I decided to disable reporting of imports from local packages (/pkg, etc)

However, maybe I'm misunderstanding this config option, but it doesn't appear to do what I expected.

Here's the configuration file: https://github.com/Southclaws/storyden/blob/main/.golangci.yml#L28

And here are the offending lines:

  • https://github.com/Southclaws/storyden/blob/main/pkg/transports/http/bindings/threads.go#L39
  • https://github.com/Southclaws/storyden/blob/main/pkg/transports/http/bindings/threads.go#L52

I assumed that a ignorePackageGlobs value of github.com/Southclaws/storyden/* would ignore these two lines as they are functions that are imported from within this pattern:

  • i.thread_svc.Create: github.com/Southclaws/storyden/pkg/services/thread.Service.Create
  • i.thread_svc.ListAll: github.com/Southclaws/storyden/pkg/services/thread.Service.Create

The actual output from running golangci-lint run:

storyden on  main [!] via 🐹 v1.18.3 on ☁️  (eu-central-1) 
❯ golangci-lint run

pkg/transports/http/bindings/threads.go:39:10: error returned from interface method should be wrapped: sig: func (github.com/Southclaws/storyden/pkg/services/thread.Service).Create(ctx context.Context, title string, body string, authorID github.com/Southclaws/storyden/pkg/resources/account.AccountID, categoryID github.com/Southclaws/storyden/pkg/resources/category.CategoryID, tags []string) (*github.com/Southclaws/storyden/pkg/resources/thread.Thread, error) (wrapcheck)
                return err
                       ^
pkg/transports/http/bindings/threads.go:52:10: error returned from interface method should be wrapped: sig: func (github.com/Southclaws/storyden/pkg/services/thread.Service).ListAll(ctx context.Context, before time.Time, max int) ([]*github.com/Southclaws/storyden/pkg/resources/thread.Thread, error) (wrapcheck)
                return err
                       ^

I wondered if it was golangci lint just using an outdated version but this occurs on the latest standalone version of wrapcheck too.

I tried with a .wrapcheck.yaml file with:

ignorePackageGlobs:
  - github.com/Southclaws/storyden/*
  - github.com/Southclaws/storyden/pkg/*
  - pkg/*
  - ./pkg/*

but I can't seem to get any patterns to ignore correctly.

Thanks!

Created at 1 month ago
pull request closed
fix: check interface package against ignorePackageGlobs

This PR introduces checking of the interface's package against the configured ignorePackageGlobs values.

Previously, only functions called directly from other packages had their packages checked against this option, however this behaviour was unintuitive. This change checks the interface package as well, ignoring interfaces which originate from a package matching a glob pattern.

Closes #34

Created at 1 month ago
pull request opened
fix: check interface package against ignorePackageGlobs

This PR introduces checking of the interface's package against the configured ignorePackageGlobs values.

Previously, only functions called directly from other packages had their packages checked against this option, however this behaviour was unintuitive. This change checks the interface package as well, ignoring interfaces which originate from a package matching a glob pattern.

Closes #34

Created at 1 month ago
create branch
tomarrell create branch ignore-package-globs-interface
Created at 1 month ago
issue comment
ignorePackageGlobs doesn't appear to be working

Thanks for the info @hackerwins, I'll look at reproducing your case and pushing a fix soon.

Created at 1 month ago

feat: optional rotation

Created at 2 months ago

docs: update readme

Created at 2 months ago

chore: remove todo

Created at 2 months ago

chore: remove logging

Created at 2 months ago

chore: add more transform tests

Created at 2 months ago

feat: transform returned point

docs: add readme

Created at 2 months ago