Skip to content

Commit

Permalink
chore: adds vanity import check. (open-telemetry#6305)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Nov 23, 2021
1 parent c1931e1 commit eacfde3
Show file tree
Hide file tree
Showing 1,160 changed files with 1,169 additions and 1,156 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Lint
run: make -j2 golint
- name: Checks
run: make -j4 checklicense misspell checkdoc impi
run: make -j4 checklicense misspell checkdoc impi porto
- name: Codegem
run: |
make generate
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ gofmt:
golint:
$(MAKE) for-all-target TARGET="lint"

.PHONY: goporto
goporto:
$(MAKE) for-all-target TARGET="porto"

.PHONY: for-all
for-all:
@echo "running $${CMD} in root"
Expand Down Expand Up @@ -163,6 +167,7 @@ install-tools:
cd $(TOOLS_MOD_DIR) && go install go.opentelemetry.io/build-tools/issuegenerator
cd $(TOOLS_MOD_DIR) && go install golang.org/x/tools/cmd/goimports
cd $(TOOLS_MOD_DIR) && go install go.opentelemetry.io/build-tools/multimod
cd $(TOOLS_MOD_DIR) && go install github.com/jcchavezs/porto/cmd/porto

.PHONY: run
run:
Expand Down
4 changes: 4 additions & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ fmt:
lint:
$(LINT) run --allow-parallel-runners

.PHONY: porto
porto:
porto -w --include-internal --skip-dirs "^cmd$$" ./

.PHONY: misspell
misspell:
$(MISSPELL) $(ALL_SRC_AND_DOC)
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package configschema
package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema"

import (
"go/ast"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package configschema
package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/docsgen/docsgen/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package docsgen
package docsgen // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema/docsgen/docsgen"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/docsgen/docsgen/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package docsgen
package docsgen // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema/docsgen/docsgen"

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/docsgen/docsgen/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package docsgen
package docsgen // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema/docsgen/docsgen"

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package configschema
package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package configschema
package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import "go.opentelemetry.io/collector/config"

Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/logs_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"sort"
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/sanitize.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/trace_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alibabacloudlogserviceexporter
package alibabacloudlogserviceexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awscloudwatchlogsexporter
package awscloudwatchlogsexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter"

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awscloudwatchlogsexporter
package awscloudwatchlogsexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// Package awscloudwatchlogsexporter provides a logging exporter for the OpenTelemetry collector.
// This package is subject to change and may break configuration settings and behavior.
package awscloudwatchlogsexporter
package awscloudwatchlogsexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"go.opentelemetry.io/collector/config"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/cwlog_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/datapoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

// Package awsemfexporter implements an OpenTelemetry Collector exporter that sends EmbeddedMetricFormat to
// AWS CloudWatch Logs in the region the collector is running in using the PutLogEvents API.
package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/emf_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/grouped_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package handler
package handler // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/handler"

import "github.com/aws/aws-sdk-go/aws/request"

Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/metric_declaration.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/metric_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awsemfexporter
package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awskinesisexporter
package awskinesisexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter"

import (
"go.opentelemetry.io/collector/config"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awskinesisexporter
package awskinesisexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package awskinesisexporter
package awskinesisexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/internal/batch/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package batch
package batch // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/batch"

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/internal/batch/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package batch
package batch // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/batch"

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package batch
package batch // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/batch"

import (
"github.com/gogo/protobuf/proto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package batch
package batch // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/batch"

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package batch
package batch // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskinesisexporter/internal/batch"

import "go.opentelemetry.io/collector/model/pdata"

Expand Down
Loading

0 comments on commit eacfde3

Please sign in to comment.