From 257493c4c4f8caf1049ffabd0fd6ee3e9a2a7e47 Mon Sep 17 00:00:00 2001 From: William Claude Date: Sun, 17 Nov 2024 10:18:46 +0100 Subject: [PATCH] change analyzer pkg name to filebuildtag (#3) --- cmd/filebuildtag/main.go | 4 ++-- pkg/{analyzer => filebuildtag}/analyzer.go | 4 ++-- pkg/{analyzer => filebuildtag}/analyzer_test.go | 2 +- .../testdata/src/buildtag/buildtag.go | 0 .../testdata/src/filebuildtag_exact/pref_tag1_suff.go | 0 .../testdata/src/filebuildtag_exact/pref_tag2_suff.go | 0 .../testdata/src/filebuildtag_wildcard/file.go | 0 .../testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go | 0 .../testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/tag1_suff.go | 0 .../testdata/src/filebuildtag_wildcard/tag2_suff.go | 0 15 files changed, 5 insertions(+), 5 deletions(-) rename pkg/{analyzer => filebuildtag}/analyzer.go (96%) rename pkg/{analyzer => filebuildtag}/analyzer_test.go (99%) rename pkg/{analyzer => filebuildtag}/testdata/src/buildtag/buildtag.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_exact/pref_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_exact/pref_tag2_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/file.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/tag1_suff.go (100%) rename pkg/{analyzer => filebuildtag}/testdata/src/filebuildtag_wildcard/tag2_suff.go (100%) diff --git a/cmd/filebuildtag/main.go b/cmd/filebuildtag/main.go index f7d8153..2d0c7a4 100644 --- a/cmd/filebuildtag/main.go +++ b/cmd/filebuildtag/main.go @@ -1,10 +1,10 @@ package main import ( - "github.com/aziule/filebuildtag/pkg/analyzer" + "github.com/aziule/filebuildtag/pkg/filebuildtag" "golang.org/x/tools/go/analysis/singlechecker" ) func main() { - singlechecker.Main(analyzer.Analyzer) + singlechecker.Main(filebuildtag.Analyzer) } diff --git a/pkg/analyzer/analyzer.go b/pkg/filebuildtag/analyzer.go similarity index 96% rename from pkg/analyzer/analyzer.go rename to pkg/filebuildtag/analyzer.go index b5ecc27..2f7868f 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/filebuildtag/analyzer.go @@ -1,5 +1,5 @@ -// Package analyzer exposes the analyzer.Analyzer object and code to use the filebuildtag linter. -package analyzer +// Package filebuildtag exposes the analyzer.Analyzer object and code to use the filebuildtag linter. +package filebuildtag import ( "flag" diff --git a/pkg/analyzer/analyzer_test.go b/pkg/filebuildtag/analyzer_test.go similarity index 99% rename from pkg/analyzer/analyzer_test.go rename to pkg/filebuildtag/analyzer_test.go index ca1dd74..8b78952 100644 --- a/pkg/analyzer/analyzer_test.go +++ b/pkg/filebuildtag/analyzer_test.go @@ -1,4 +1,4 @@ -package analyzer +package filebuildtag import ( "errors" diff --git a/pkg/analyzer/testdata/src/buildtag/buildtag.go b/pkg/filebuildtag/testdata/src/buildtag/buildtag.go similarity index 100% rename from pkg/analyzer/testdata/src/buildtag/buildtag.go rename to pkg/filebuildtag/testdata/src/buildtag/buildtag.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_exact/pref_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_exact/pref_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_exact/pref_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_exact/pref_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_exact/pref_tag2_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_exact/pref_tag2_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_exact/pref_tag2_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_exact/pref_tag2_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/file.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/file.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/file.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/file.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref1_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref2_tag2_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref3_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref4_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref5_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/pref6_tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/tag1_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/tag1_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/tag1_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/tag1_suff.go diff --git a/pkg/analyzer/testdata/src/filebuildtag_wildcard/tag2_suff.go b/pkg/filebuildtag/testdata/src/filebuildtag_wildcard/tag2_suff.go similarity index 100% rename from pkg/analyzer/testdata/src/filebuildtag_wildcard/tag2_suff.go rename to pkg/filebuildtag/testdata/src/filebuildtag_wildcard/tag2_suff.go