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

Next release planning: v0.3.0 #149

Closed
22 of 24 tasks
quasilyte opened this issue Dec 21, 2020 · 1 comment
Closed
22 of 24 tasks

Next release planning: v0.3.0 #149

quasilyte opened this issue Dec 21, 2020 · 1 comment

Comments

@quasilyte
Copy link
Owner

quasilyte commented Dec 21, 2020

Pre-release:

  • User-defined filters feature preview (see this comment, refs Suggestion: add Addr keyword to get pointer type from non-pointer type #129)
  • Remove anonymous rule groups support (so we only have "named" ones)
  • Make dsl a Go module (which is a submodule of ruleguard), get rid of the embedded one and dslgen
  • Re-think terminology, update docs
  • Implement gorules bundle feature
  • Fix Type.Implements issue related to the Go types.Importer
  • Rename dsl/fluent package to just dsl
  • Which importer should go first: source or gc? (solved: source)
  • Test that -e works
  • Add docker tests for install+run in clear environment
  • Figure out the best way/place to control which rules from the bundle are enabled
  • Enable some rules on ruleguard project itself, so we get extra testing via dogfooding
  • Add a way to test ruleguard modules Make it simple to write user-side tests for rules #91
  • Add more docs and comments on the public ruleguard package API
  • Consolidate debug flags and modes

Release:

  • Update old articles? Note: docs renamed to _docs
  • Update installation instructions
  • Upload binaries (make sure they contains correct analyzer.Version value set)
  • Update test-release RELEASE variable
  • Add a play-with-go guide (see guides: using ruleguard play-with-go/play-with-go#343)
  • Prepare an article that would explain all new features
  • Update ruleguard in go-critic

Extracurricular activity:

quasilyte added a commit that referenced this issue Dec 22, 2020
Previously, DSL was 99% about fluent.Matcher which sounds OK
because the matcher itself is a "Fluent API" (tm).

But it makes freestanding functions in fluent package awkward.
"dsl" package gives no restrictions in that regard.

Refs #149
quasilyte added a commit that referenced this issue Dec 22, 2020
Previously, DSL was 99% about fluent.Matcher which sounds OK
because the matcher itself is a "Fluent API" (tm).

But it makes freestanding functions in fluent package awkward.
"dsl" package gives no restrictions in that regard.

Refs #149
quasilyte added a commit that referenced this issue Dec 22, 2020
Previously, DSL was 99% about fluent.Matcher which sounds OK
because the matcher itself is a "Fluent API" (tm).

But it makes freestanding functions in fluent package awkward.
"dsl" package gives no restrictions in that regard.

Refs #149
@quasilyte
Copy link
Owner Author

Actually, maybe it's a good idea to keep the latest dsl/fluent version for some time and give the deprecation warning every time it's used.

This way, old rules.go files will work with updated ruleguard binary.

quasilyte added a commit that referenced this issue Dec 31, 2020
`-enable` and `-disable` are a comma separated lists.
It's not very convenient to specify a long list in bash,
but since most configuration is done in yaml (golangci-lint),
it should be somewhat readable:

	disable: >-
		A,
		B,
		C

Another option:

	disable: "\
		A,\
		B,\
		C"

Useful in combination with ruleguard modules.
Rules from modules can be disabled via -disable flag.

Both `-enable` and `-disable` flags can be debugged with
`-debug-enable-disable `flag (prints whether a group was enabled/disabled).

Refs #149
quasilyte added a commit that referenced this issue Dec 31, 2020
`-enable` and `-disable` are a comma separated lists.
It's not very convenient to specify a long list in bash,
but since most configuration is done in yaml (golangci-lint),
it should be somewhat readable:

	disable: >-
		A,
		B,
		C

Another option:

	disable: "\
		A,\
		B,\
		C"

Useful in combination with ruleguard modules.
Rules from modules can be disabled via -disable flag.

Both `-enable` and `-disable` flags can be debugged with
`-debug-enable-disable `flag (prints whether a group was enabled/disabled).

Refs #149
quasilyte added a commit that referenced this issue Dec 31, 2020
`-enable` and `-disable` are a comma separated lists.
It's not very convenient to specify a long list in bash,
but since most configuration is done in yaml (golangci-lint),
it should be somewhat readable:

	disable: >-
		A,
		B,
		C

Another option:

	disable: "\
		A,\
		B,\
		C"

Useful in combination with ruleguard modules.
Rules from modules can be disabled via -disable flag.

Both `-enable` and `-disable` flags can be debugged with
`-debug-enable-disable `flag (prints whether a group was enabled/disabled).

Refs #149
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
quasilyte added a commit that referenced this issue Dec 31, 2020
Since Go rules are ordinary Go modules, it's now trivial
to write `go/analysis` style tests using the `go-ruleguard/analyzer` package.

Should be convenient enough for now:

	func TestRules(t *testing.T) {
		testdata := analysistest.TestData()
		if err := analyzer.Analyzer.Flags.Set("rules", "rules.go"); err != nil {
			t.Fatalf("set rules flag: %v", err)
		}
		analysistest.Run(t, testdata, analyzer.Analyzer, "./...")
	}

Where `rules.go` is a rules file (or several files, separated by a comma) to be tested.
`testdate` should have Go files to be analyzed.

Fixes #91
Refs #149
quasilyte added a commit that referenced this issue Dec 31, 2020
Since Go rules are ordinary Go modules, it's now trivial
to write `go/analysis` style tests using the `go-ruleguard/analyzer` package.

Should be convenient enough for now:

	func TestRules(t *testing.T) {
		testdata := analysistest.TestData()
		if err := analyzer.Analyzer.Flags.Set("rules", "rules.go"); err != nil {
			t.Fatalf("set rules flag: %v", err)
		}
		analysistest.Run(t, testdata, analyzer.Analyzer, "./...")
	}

Where `rules.go` is a rules file (or several files, separated by a comma) to be tested.
`testdate` should have Go files to be analyzed.

Fixes #91
Refs #149
quasilyte added a commit that referenced this issue Dec 31, 2020
Since Go rules are ordinary Go modules, it's now trivial
to write `go/analysis` style tests using the `go-ruleguard/analyzer` package.

Should be convenient enough for now:

	func TestRules(t *testing.T) {
		testdata := analysistest.TestData()
		if err := analyzer.Analyzer.Flags.Set("rules", "rules.go"); err != nil {
			t.Fatalf("set rules flag: %v", err)
		}
		analysistest.Run(t, testdata, analyzer.Analyzer, "./...")
	}

Where `rules.go` is a rules file (or several files, separated by a comma) to be tested.
`testdate` should have Go files to be analyzed.

Fixes #91
Refs #149
quasilyte added a commit that referenced this issue Jan 12, 2021
quasilyte added a commit that referenced this issue Jan 12, 2021
quasilyte added a commit that referenced this issue Jan 12, 2021
quasilyte added a commit that referenced this issue Jan 12, 2021
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

No branches or pull requests

1 participant