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

chore: rename import path #13

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli

Check warning on line 1 in cli/main.go

View workflow job for this annotation

GitHub Actions / Lint

should have a package comment

import (
"flag"
Expand All @@ -8,8 +8,8 @@
"runtime/debug"
"strings"

"github.com/deepsourcelabs/revive/config"
"github.com/deepsourcelabs/revive/revivelib"
"github.com/DeepSourceCorp/revive/config"
"github.com/DeepSourceCorp/revive/revivelib"
"github.com/fatih/color"
"github.com/mitchellh/go-homedir"
)
Expand Down
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package config

Check warning on line 1 in config/config.go

View workflow job for this annotation

GitHub Actions / Lint

should have a package comment

import (
"errors"
"fmt"
"io/ioutil"

"github.com/deepsourcelabs/revive/formatter"
"github.com/DeepSourceCorp/revive/formatter"

"github.com/BurntSushi/toml"
"github.com/deepsourcelabs/revive/lint"
"github.com/deepsourcelabs/revive/rule"
"github.com/DeepSourceCorp/revive/lint"
"github.com/DeepSourceCorp/revive/rule"
)

var defaultRules = []lint.Rule{
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/deepsourcelabs/revive/lint"
"github.com/deepsourcelabs/revive/rule"
"github.com/DeepSourceCorp/revive/lint"
"github.com/DeepSourceCorp/revive/rule"
)

func TestGetConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion formatter/checkstyle.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package formatter

Check warning on line 1 in formatter/checkstyle.go

View workflow job for this annotation

GitHub Actions / Lint

should have a package comment

import (
"bytes"
"encoding/xml"
plainTemplate "text/template"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// Checkstyle is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package formatter
import (
"fmt"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// Default is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/friendly.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"sort"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
"github.com/fatih/color"
"github.com/olekukonko/tablewriter"
)
Expand Down
2 changes: 1 addition & 1 deletion formatter/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package formatter
import (
"encoding/json"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// JSON is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/ndjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"os"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// NDJSON is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/plain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package formatter
import (
"fmt"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// Plain is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/sarif.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"strings"

"github.com/DeepSourceCorp/revive/lint"
"github.com/chavacava/garif"
"github.com/deepsourcelabs/revive/lint"
)

// Sarif is an implementation of the Formatter interface
Expand Down
2 changes: 1 addition & 1 deletion formatter/severity.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package formatter

import "github.com/deepsourcelabs/revive/lint"
import "github.com/DeepSourceCorp/revive/lint"

func severity(config lint.Config, failure lint.Failure) lint.Severity {
if config, ok := config.Rules[failure.RuleName]; ok && config.Severity == lint.SeverityError {
Expand Down
2 changes: 1 addition & 1 deletion formatter/stylish.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"fmt"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
"github.com/fatih/color"
"github.com/olekukonko/tablewriter"
)
Expand Down
5 changes: 3 additions & 2 deletions formatter/unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package formatter
import (
"fmt"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// Unix is an implementation of the Formatter interface
// which formats the errors to a simple line based error format
// main.go:24:9: [errorf] should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
//
// main.go:24:9: [errorf] should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
type Unix struct {
Metadata lint.FormatterMetadata
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/deepsourcelabs/revive
module github.com/DeepSourceCorp/revive

go 1.17

Expand Down
2 changes: 1 addition & 1 deletion lint/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"golang.org/x/tools/go/gcexportdata"

"github.com/deepsourcelabs/revive/internal/typeparams"
"github.com/DeepSourceCorp/revive/internal/typeparams"
)

// Package represents a package in the project.
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

Check warning on line 1 in main.go

View workflow job for this annotation

GitHub Actions / Lint

should have a package comment

import "github.com/deepsourcelabs/revive/cli"
import "github.com/DeepSourceCorp/revive/cli"

func main() {
cli.RunRevive()
Expand Down
6 changes: 3 additions & 3 deletions revivelib/core.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package revivelib

Check warning on line 1 in revivelib/core.go

View workflow job for this annotation

GitHub Actions / Lint

should have a package comment

import (
"io/ioutil"
"log"
"strings"

"github.com/deepsourcelabs/revive/config"
"github.com/deepsourcelabs/revive/lint"
"github.com/deepsourcelabs/revive/logging"
"github.com/DeepSourceCorp/revive/config"
"github.com/DeepSourceCorp/revive/lint"
"github.com/DeepSourceCorp/revive/logging"
"github.com/mgechev/dots"
"github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions revivelib/core_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import (
"testing"

"github.com/deepsourcelabs/revive/config"
"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/config"
"github.com/DeepSourceCorp/revive/lint"
)

func TestReviveCreateInstance(t *testing.T) {
Expand Down Expand Up @@ -43,7 +43,7 @@
return "mock-rule"
}

func (*mockRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {

Check warning on line 46 in revivelib/core_internal_test.go

View workflow job for this annotation

GitHub Actions / Lint

parameter 'file' seems to be unused, consider removing or renaming it as _

Check warning on line 46 in revivelib/core_internal_test.go

View workflow job for this annotation

GitHub Actions / Lint

parameter 'arguments' seems to be unused, consider removing or renaming it as _
return nil
}

Expand Down
6 changes: 3 additions & 3 deletions revivelib/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"strings"
"testing"

"github.com/deepsourcelabs/revive/config"
"github.com/deepsourcelabs/revive/lint"
"github.com/deepsourcelabs/revive/revivelib"
"github.com/DeepSourceCorp/revive/config"
"github.com/DeepSourceCorp/revive/lint"
"github.com/DeepSourceCorp/revive/revivelib"
)

func TestReviveLint(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion revivelib/extra_rule.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package revivelib

import "github.com/deepsourcelabs/revive/lint"
import "github.com/DeepSourceCorp/revive/lint"

// ExtraRule configures a new rule to be used with revive.
type ExtraRule struct {
Expand Down
2 changes: 1 addition & 1 deletion rule/add-constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion rule/argument-limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/ast"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// ArgumentsLimitRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/atomic.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/token"
"go/types"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// AtomicRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/banned-characters.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// BannedCharsRule checks if a file contains banned characters.
Expand Down
2 changes: 1 addition & 1 deletion rule/bare-return.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// BareReturnRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/blank-imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"strings"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// BlankImportsRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/bool-literal-in-expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"go/token"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// BoolLiteralRule warns when logic expressions contains Boolean literals.
Expand Down
2 changes: 1 addition & 1 deletion rule/call-to-gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// CallToGCRule lints calls to the garbage collector.
Expand Down
2 changes: 1 addition & 1 deletion rule/cognitive-complexity.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"go/token"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
"golang.org/x/tools/go/ast/astutil"
)

Expand Down
2 changes: 1 addition & 1 deletion rule/confusing-naming.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

type referenceMethod struct {
Expand Down
2 changes: 1 addition & 1 deletion rule/confusing-results.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// ConfusingResultsRule lints given function declarations
Expand Down
2 changes: 1 addition & 1 deletion rule/constant-logical-expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"go/token"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// ConstantLogicalExprRule warns on constant logical expressions.
Expand Down
2 changes: 1 addition & 1 deletion rule/context-as-argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// ContextAsArgumentRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/context-keys-type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/ast"
"go/types"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// ContextKeysType lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/cyclomatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"go/token"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// Based on https://github.com/fzipp/gocyclo
Expand Down
2 changes: 1 addition & 1 deletion rule/datarace.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// DataRaceRule lints assignments to value method-receivers.
Expand Down
2 changes: 1 addition & 1 deletion rule/deep-exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// DeepExitRule lints program exit at functions other than main or init.
Expand Down
2 changes: 1 addition & 1 deletion rule/defer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/ast"
"sync"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// DeferRule lints unused params in functions.
Expand Down
2 changes: 1 addition & 1 deletion rule/dot-imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// DotImportsRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/duplicated-imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"fmt"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// DuplicatedImportsRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/early-return.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// EarlyReturnRule lints given else constructs.
Expand Down
2 changes: 1 addition & 1 deletion rule/empty-block.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rule
import (
"go/ast"

"github.com/deepsourcelabs/revive/lint"
"github.com/DeepSourceCorp/revive/lint"
)

// EmptyBlockRule lints given else constructs.
Expand Down
Loading
Loading