Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made go-critic's rules exportable #1175

Closed
wants to merge 0 commits into from
Closed

Conversation

peakle
Copy link
Contributor

@peakle peakle commented Dec 26, 2021

No description provided.

@cristaloleg
Copy link
Member

But why?

@@ -4,6 +4,9 @@ import (
"github.com/quasilyte/go-ruleguard/dsl"
)

// Bundle - used to import rules by external packages
var Bundle = dsl.Bundle{}
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, we're using rules embedding in go-critic for builtin rules.
This means we can't export rules normally:
quasilyte/go-ruleguard#355

This is not a hard issue to fix in ruleguard, but right now it's not an option to use bundle vars in linters that use a precompile step.

@quasilyte
Copy link
Member

We really need docker (or whatever) tests to check that gocritic can work without installed dsl dependency for the cases where custom ruleguard rules are not needed.

Embedded rules should not require dsl package.

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.

None yet

3 participants