Skip to content

Commit

Permalink
run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tlin4194 committed Dec 2, 2024
1 parent 5fbd36d commit fa88f07
Show file tree
Hide file tree
Showing 138 changed files with 275 additions and 374 deletions.
3 changes: 1 addition & 2 deletions cmd/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"

homedir "github.com/mitchellh/go-homedir"
server "github.com/runatlantis/atlantis/server/legacy"
"github.com/runatlantis/atlantis/server/legacy/events/vcs/fixtures"
. "github.com/runatlantis/atlantis/testing"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"
)

Expand Down
3 changes: 1 addition & 2 deletions server/config/parser_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"strings"
"testing"

"github.com/runatlantis/atlantis/server/config/raw"

"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/config"
"github.com/runatlantis/atlantis/server/config/raw"
"github.com/runatlantis/atlantis/server/config/valid"
. "github.com/runatlantis/atlantis/testing"
)
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/controllers/events/events_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ import (
"fmt"
"net/http"

httputils "github.com/runatlantis/atlantis/server/legacy/http"

requestErrors "github.com/runatlantis/atlantis/server/legacy/controllers/events/errors"
"github.com/runatlantis/atlantis/server/legacy/controllers/events/handlers"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
httputils "github.com/runatlantis/atlantis/server/legacy/http"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"
key "github.com/runatlantis/atlantis/server/neptune/context"
Expand Down
16 changes: 7 additions & 9 deletions server/legacy/controllers/events/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,27 @@ import (
"github.com/runatlantis/atlantis/server/legacy/core/locking"
"github.com/runatlantis/atlantis/server/legacy/core/runtime"
runtime_models "github.com/runatlantis/atlantis/server/legacy/core/runtime/models"
"github.com/runatlantis/atlantis/server/legacy/jobs"
lyftCommand "github.com/runatlantis/atlantis/server/legacy/lyft/command"
event_types "github.com/runatlantis/atlantis/server/neptune/gateway/event"
github_converter "github.com/runatlantis/atlantis/server/vcs/provider/github/converter"
"github.com/runatlantis/atlantis/server/vcs/provider/github/request"
ffclient "github.com/thomaspoignant/go-feature-flag"

"github.com/runatlantis/atlantis/server/legacy/core/runtime/policy"
"github.com/runatlantis/atlantis/server/legacy/core/terraform"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/vcs/markdown"

"github.com/runatlantis/atlantis/server/legacy/events/vcs"
lyft_vcs "github.com/runatlantis/atlantis/server/legacy/events/vcs/lyft"
"github.com/runatlantis/atlantis/server/legacy/events/vcs/types"
"github.com/runatlantis/atlantis/server/legacy/events/webhooks"
"github.com/runatlantis/atlantis/server/legacy/jobs"
lyftCommand "github.com/runatlantis/atlantis/server/legacy/lyft/command"
"github.com/runatlantis/atlantis/server/legacy/wrappers"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"
"github.com/runatlantis/atlantis/server/models"
event_types "github.com/runatlantis/atlantis/server/neptune/gateway/event"
"github.com/runatlantis/atlantis/server/neptune/lyft/feature"
"github.com/runatlantis/atlantis/server/vcs/markdown"
github_converter "github.com/runatlantis/atlantis/server/vcs/provider/github/converter"
"github.com/runatlantis/atlantis/server/vcs/provider/github/request"
. "github.com/runatlantis/atlantis/testing"
ffclient "github.com/thomaspoignant/go-feature-flag"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/controllers/events/handlers/pull_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"context"
"fmt"

contextInternal "github.com/runatlantis/atlantis/server/neptune/context"

"github.com/runatlantis/atlantis/server/legacy/controllers/events/errors"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/http"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"
contextInternal "github.com/runatlantis/atlantis/server/neptune/context"
event_types "github.com/runatlantis/atlantis/server/neptune/gateway/event"
)

Expand Down
3 changes: 1 addition & 2 deletions server/legacy/controllers/github_app_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (
"net/http"
"net/url"

"github.com/runatlantis/atlantis/server/neptune/lyft/feature"

"github.com/runatlantis/atlantis/server/legacy/controllers/templates"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/neptune/lyft/feature"
)

// GithubAppController handles the creation and setup of a new GitHub app
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/controllers/locks_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import (
"net/http"
"net/url"

"github.com/gorilla/mux"
"github.com/runatlantis/atlantis/server/legacy/controllers/templates"
"github.com/runatlantis/atlantis/server/legacy/core/db"

"github.com/gorilla/mux"
"github.com/runatlantis/atlantis/server/legacy/core/locking"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
Expand Down
8 changes: 3 additions & 5 deletions server/legacy/controllers/locks_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ import (
"testing"
"time"

"github.com/gorilla/mux"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/legacy/controllers"
"github.com/runatlantis/atlantis/server/legacy/controllers/templates"
tMocks "github.com/runatlantis/atlantis/server/legacy/controllers/templates/mocks"
"github.com/runatlantis/atlantis/server/legacy/core/db"
"github.com/runatlantis/atlantis/server/legacy/core/locking"

"github.com/gorilla/mux"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/legacy/events"

"github.com/runatlantis/atlantis/server/legacy/core/locking/mocks"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/command"
mocks2 "github.com/runatlantis/atlantis/server/legacy/events/mocks"
vcsmocks "github.com/runatlantis/atlantis/server/legacy/events/vcs/mocks"
Expand Down
3 changes: 2 additions & 1 deletion server/legacy/controllers/websocket/instrumented_mux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package websocket

import (
"github.com/uber-go/tally/v4"
"net/http"

"github.com/uber-go/tally/v4"
)

type InstrumentedMultiplexor struct {
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/db/boltdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import (
"testing"
"time"

"github.com/runatlantis/atlantis/server/legacy/core/db"

"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/legacy/core/db"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/models"
. "github.com/runatlantis/atlantis/testing"
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/locking/locking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ package locking_test

import (
"errors"
"strings"
"testing"
"time"

"strings"

. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/legacy/core/locking"
"github.com/runatlantis/atlantis/server/legacy/core/locking/mocks"
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/runtime/apply_step_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import (
"reflect"
"strings"

"github.com/pkg/errors"

version "github.com/hashicorp/go-version"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/models"
)
Expand Down
1 change: 0 additions & 1 deletion server/legacy/core/runtime/apply_step_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/runatlantis/atlantis/server/legacy/events/mocks/matchers"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"

. "github.com/runatlantis/atlantis/testing"
)

Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/runtime/env_step_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"testing"

"github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/legacy/core/runtime"
"github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"

. "github.com/petergtz/pegomock"
. "github.com/runatlantis/atlantis/testing"
)

Expand Down
1 change: 0 additions & 1 deletion server/legacy/core/runtime/init_step_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
version "github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
"github.com/pkg/errors"

"github.com/runatlantis/atlantis/server/legacy/core/runtime"
"github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks"
matchers2 "github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks/matchers"
Expand Down
6 changes: 2 additions & 4 deletions server/legacy/core/runtime/plan_step_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ import (
"testing"

"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/legacy/events/command"
mocks2 "github.com/runatlantis/atlantis/server/legacy/events/mocks"

. "github.com/petergtz/pegomock"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/legacy/core/runtime"
"github.com/runatlantis/atlantis/server/legacy/core/terraform/helpers"
"github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks"
matchers2 "github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks/matchers"
"github.com/runatlantis/atlantis/server/legacy/events/command"
mocks2 "github.com/runatlantis/atlantis/server/legacy/events/mocks"
"github.com/runatlantis/atlantis/server/legacy/events/mocks/matchers"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"

. "github.com/runatlantis/atlantis/testing"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import (

"github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
. "github.com/runatlantis/atlantis/testing"

"github.com/runatlantis/atlantis/server/legacy/core/runtime"
"github.com/runatlantis/atlantis/server/legacy/core/runtime/mocks"
"github.com/runatlantis/atlantis/server/legacy/events/command"
. "github.com/runatlantis/atlantis/testing"
)

var planFileContents = `
Expand Down
9 changes: 4 additions & 5 deletions server/legacy/core/runtime/policy/conftest_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ import (
"strings"

"github.com/palantir/go-githubapp/githubapp"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/config/valid"
runtime_models "github.com/runatlantis/atlantis/server/legacy/core/runtime/models"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"
"github.com/runatlantis/atlantis/server/models"
"github.com/runatlantis/atlantis/server/neptune/lyft/feature"
"github.com/runatlantis/atlantis/server/vcs/provider/github"

"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/config/valid"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/models"
)

type policyFilter interface {
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/runtime/policy_check_step_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/config/valid"
"github.com/runatlantis/atlantis/server/legacy/core/runtime"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"
"github.com/stretchr/testify/assert"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/core/terraform/async_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ import (
"github.com/runatlantis/atlantis/server/legacy/core/terraform/mocks"
"github.com/runatlantis/atlantis/server/legacy/events/command"
jobmocks "github.com/runatlantis/atlantis/server/legacy/jobs/mocks"
"github.com/stretchr/testify/assert"

"github.com/runatlantis/atlantis/server/logging"
. "github.com/runatlantis/atlantis/testing"
"github.com/stretchr/testify/assert"
)

func TestDefaultClient_RunCommandAsync_Success(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion server/legacy/core/terraform/terraform_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/hashicorp/go-getter"
"github.com/hashicorp/go-version"
"github.com/pkg/errors"

"github.com/runatlantis/atlantis/server/legacy/core/runtime/cache"
runtime_models "github.com/runatlantis/atlantis/server/legacy/core/runtime/models"
"github.com/runatlantis/atlantis/server/legacy/events/command"
Expand Down
18 changes: 8 additions & 10 deletions server/legacy/events/command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,26 @@ import (
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/uber-go/tally/v4"

. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/config/valid"
"github.com/runatlantis/atlantis/server/legacy/core/db"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
lyft_vcs "github.com/runatlantis/atlantis/server/legacy/events/vcs/lyft"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"

. "github.com/petergtz/pegomock"
lockingmocks "github.com/runatlantis/atlantis/server/legacy/core/locking/mocks"
"github.com/runatlantis/atlantis/server/legacy/events"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/legacy/events/mocks"
eventmocks "github.com/runatlantis/atlantis/server/legacy/events/mocks"
"github.com/runatlantis/atlantis/server/legacy/events/mocks/matchers"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
lyft_vcs "github.com/runatlantis/atlantis/server/legacy/events/vcs/lyft"
vcsmocks "github.com/runatlantis/atlantis/server/legacy/events/vcs/mocks"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"
"github.com/runatlantis/atlantis/server/models"
"github.com/runatlantis/atlantis/server/models/fixtures"
"github.com/runatlantis/atlantis/server/vcs/markdown"
. "github.com/runatlantis/atlantis/testing"
"github.com/stretchr/testify/assert"
"github.com/uber-go/tally/v4"
)

var projectCommandBuilder *mocks.MockProjectCommandBuilder
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/events/github_app_working_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"fmt"
"strings"

"github.com/runatlantis/atlantis/server/vcs/provider/github"

"github.com/mitchellh/go-homedir"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/models"
"github.com/runatlantis/atlantis/server/vcs/provider/github"
)

// GithubAppWorkingDir implements WorkingDir.
Expand Down
5 changes: 2 additions & 3 deletions server/legacy/events/project_command_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"fmt"
"os"

"github.com/runatlantis/atlantis/server/config/valid"
"github.com/runatlantis/atlantis/server/logging"

"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/config"
"github.com/runatlantis/atlantis/server/config/valid"
"github.com/runatlantis/atlantis/server/legacy/events/command"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
"github.com/runatlantis/atlantis/server/logging"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions server/legacy/events/project_command_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"

. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/config"
"github.com/runatlantis/atlantis/server/config/valid"
Expand All @@ -23,6 +21,7 @@ import (
"github.com/runatlantis/atlantis/server/metrics"
"github.com/runatlantis/atlantis/server/models"
. "github.com/runatlantis/atlantis/testing"
"github.com/stretchr/testify/assert"
"github.com/uber-go/tally/v4"
)

Expand Down
Loading

0 comments on commit fa88f07

Please sign in to comment.