Skip to content

Commit 1d74a7c

Browse files
authored
update lll tab size 4 (#4168)
1 parent ee72ad0 commit 1d74a7c

File tree

14 files changed

+41
-24
lines changed

14 files changed

+41
-24
lines changed

cli/azd/.golangci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ linters-settings:
1111
comparison: true
1212
lll:
1313
# GitHub recommended for code review
14-
line-length: 125
14+
line-length: 125
15+
tab-width: 4

cli/azd/cmd/container.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ func registerCommonDependencies(container *ioc.NestedContainer) {
261261

262262
// Environment manager depends on azd context
263263
container.MustRegisterSingleton(
264-
func(serviceLocator ioc.ServiceLocator, azdContext *lazy.Lazy[*azdcontext.AzdContext]) *lazy.Lazy[environment.Manager] {
264+
func(serviceLocator ioc.ServiceLocator,
265+
azdContext *lazy.Lazy[*azdcontext.AzdContext]) *lazy.Lazy[environment.Manager] {
265266
return lazy.NewLazy(func() (environment.Manager, error) {
266267
azdCtx, err := azdContext.GetValue()
267268
if err != nil {
@@ -415,7 +416,8 @@ func registerCommonDependencies(container *ioc.NestedContainer) {
415416
return nil, &internal.ErrorWithSuggestion{
416417
Err: err,
417418
Suggestion: fmt.Sprintf(
418-
"Set the cloud configuration by editing the 'cloud' node in the config.json file for the %s environment\n%s",
419+
"Set the cloud configuration by editing the 'cloud' node in the config.json "+
420+
"file for the %s environment\n%s",
419421
defaultEnvName,
420422
validClouds,
421423
),
@@ -453,8 +455,9 @@ func registerCommonDependencies(container *ioc.NestedContainer) {
453455
return cloud, nil
454456
} else {
455457
return nil, &internal.ErrorWithSuggestion{
456-
Err: err,
457-
Suggestion: fmt.Sprintf("Set the cloud configuration using 'azd config set cloud.name <name>'.\n%s", validClouds),
458+
Err: err,
459+
Suggestion: fmt.Sprintf(
460+
"Set the cloud configuration using 'azd config set cloud.name <name>'.\n%s", validClouds),
458461
}
459462
}
460463
}

cli/azd/internal/cmd/provision.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ type ProvisionFlags struct {
3434
}
3535

3636
const (
37-
AINotValid = "is not valid according to the validation procedure"
38-
openAIsubscriptionNoQuotaId = "The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'"
37+
AINotValid = "is not valid according to the validation procedure"
38+
openAIsubscriptionNoQuotaId = "The subscription does not have QuotaId/Feature required by SKU 'S0' " +
39+
"from kind 'OpenAI'"
3940
responsibleAITerms = "until you agree to Responsible AI terms for this resource"
4041
specialFeatureOrQuotaIdRequired = "SpecialFeatureOrQuotaIdRequired"
4142
)

cli/azd/internal/telemetry/storage_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ func TestStorageQueue_Cleanup(t *testing.T) {
347347
assert.Fail(
348348
t,
349349
fmt.Sprintf(
350-
"Unknown remaining file found. Filename: %s, content: %s. Expected filenames: %v, expected content: %v. ",
350+
"Unknown remaining file found. Filename: %s, content: %s. Expected filenames: %v, "+
351+
"expected content: %v. ",
351352
remainingFile.Name(),
352353
string(content),
353354
tt.expectedFilesRemaining,

cli/azd/internal/telemetry/uploader.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ func (u *TelemetryUploader) transmit(ctx context.Context, item *StoredItem) {
193193
u.enqueueRetry(ctx, item.fileName, payload, defaultTransmitRetryDelay, attempts)
194194
} else if result.CanRetry() {
195195
if attempts > maxRetryCount {
196-
log.Printf("failed to send %v after %d attempts, statusCode: %d\n", item.fileName, maxRetryCount, result.StatusCode)
196+
log.Printf(
197+
"failed to send %v after %d attempts, statusCode: %d\n", item.fileName, maxRetryCount, result.StatusCode)
197198
return
198199
}
199200

cli/azd/internal/vsrpc/environment_service_create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func (s *environmentService) CreateEnvironmentAsync(
4747

4848
// We had thought at one point that we would introduce `ASPIRE_ENVIRONMENT` as a sibling to `ASPNETCORE_ENVIRONMENT` and
4949
// `DOTNET_ENVIRONMENT` and was aspire specific. We no longer intend to do this (because having both DOTNET and
50-
// ASPNETCORE versions is already confusing enough). For now, we'll use `ASPIRE_ENVIRONMENT` to seed the initial values of
51-
// `DOTNET_ENVIRONMENT`, but allow them to be overriden at environment construction time.
50+
// ASPNETCORE versions is already confusing enough). For now, we'll use `ASPIRE_ENVIRONMENT` to seed the initial values
51+
// of `DOTNET_ENVIRONMENT`, but allow them to be overriden at environment construction time.
5252
//
5353
// We only retain `DOTNET_ENVIRONMENT` in the .env file.
5454
dotnetEnv := newEnv.Properties["ASPIRE_ENVIRONMENT"]

cli/azd/pkg/auth/manager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ func (m *Manager) CredentialForCurrentUser(
300300
return nil, err
301301
}
302302

303-
return newAzdCredential(&msalPublicClientAdapter{client: &clientWithNewTenant}, &accounts[i], m.cloud), nil
303+
return newAzdCredential(
304+
&msalPublicClientAdapter{client: &clientWithNewTenant}, &accounts[i], m.cloud), nil
304305
}
305306
}
306307
}

cli/azd/pkg/pipeline/github_provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ func (p *GitHubCiProvider) configurePipeline(
652652
p.console.MessageUxItem(ctx, &ux.MultilineMessage{
653653
Lines: []string{
654654
"",
655-
"GitHub Action secrets are now configured. You can view GitHub action secrets that were created at this link:",
655+
"GitHub Action secrets are now configured. You can view GitHub action secrets that were " +
656+
"created at this link:",
656657
output.WithLinkFormat("https://github.com/%s/settings/secrets/actions", repoSlug),
657658
""},
658659
})

cli/azd/pkg/pipeline/pipeline_manager.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ func (pm *PipelineManager) Configure(ctx context.Context, projectName string) (r
458458
} else {
459459
pm.console.Message(ctx,
460460
fmt.Sprintf(
461-
"To fully enable pipeline you need to push this repo to the upstream using 'git push --set-upstream %s %s'.\n",
461+
"To fully enable pipeline you need to push this repo to the upstream "+
462+
"using 'git push --set-upstream %s %s'.\n",
462463
pm.args.PipelineRemoteName,
463464
gitRepoInfo.branch))
464465
}
@@ -881,7 +882,8 @@ func (pm *PipelineManager) promptForCiFiles(ctx context.Context, pipelineProvide
881882
// Confirm with the user before adding the file
882883
pm.console.Message(ctx, "")
883884
pm.console.Message(ctx,
884-
fmt.Sprintf("The default %s file, which contains a basic workflow to help you get started, is missing from your project.",
885+
fmt.Sprintf(
886+
"The default %s file, which contains a basic workflow to help you get started, is missing from your project.",
885887
output.WithHighLightFormat("azure-dev.yml")))
886888
pm.console.Message(ctx, "")
887889

cli/azd/pkg/pipeline/pipeline_manager_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ func Test_PipelineManager_Initialize(t *testing.T) {
9292

9393
manager, err := createPipelineManager(t, mockContext, azdContext, nil, nil)
9494
assert.Nil(t, manager)
95-
assert.EqualError(t, err, fmt.Sprintf("%s provider selected, but %s is empty. Please add pipeline files and try again.",
95+
assert.EqualError(t, err, fmt.Sprintf(
96+
"%s provider selected, but %s is empty. Please add pipeline files and try again.",
9697
azdoDisplayName, azdoPipelinesDirectory))
9798
})
9899
t.Run("no files - azdo selected", func(t *testing.T) {
@@ -129,7 +130,8 @@ func Test_PipelineManager_Initialize(t *testing.T) {
129130

130131
manager, err := createPipelineManager(t, mockContext, azdContext, env, nil)
131132
assert.Nil(t, manager)
132-
assert.EqualError(t, err, fmt.Sprintf("%s provider selected, but %s is empty. Please add pipeline files and try again.",
133+
assert.EqualError(t, err, fmt.Sprintf(
134+
"%s provider selected, but %s is empty. Please add pipeline files and try again.",
133135
azdoDisplayName, azdoPipelinesDirectory))
134136
})
135137
t.Run("from persisted data azdo", func(t *testing.T) {

cli/azd/pkg/tools/azcli/azcli_linuxwebapp_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ func registerIsLinuxWebAppMocks(mockContext *mocks.MockContext, ran *bool) {
9999
mockContext.HttpClient.When(func(request *http.Request) bool {
100100
return request.Method == http.MethodGet &&
101101
strings.Contains(request.URL.Path,
102-
"/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_ID/providers/Microsoft.Web/sites/LINUX_WEB_APP_NAME")
102+
"/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_ID/providers/Microsoft.Web/sites/"+
103+
"LINUX_WEB_APP_NAME")
103104
}).RespondFn(func(request *http.Request) (*http.Response, error) {
104105
*ran = true
105106
response := armappservice.WebAppsClientGetResponse{
@@ -130,7 +131,8 @@ func registerLogicAppMocks(mockContext *mocks.MockContext, ran *bool) {
130131
mockContext.HttpClient.When(func(request *http.Request) bool {
131132
return request.Method == http.MethodGet &&
132133
strings.Contains(request.URL.Path,
133-
"/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_ID/providers/Microsoft.Web/sites/WINDOWS_LOGIC_APP_NAME")
134+
"/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_ID/providers/Microsoft.Web/sites/"+
135+
"WINDOWS_LOGIC_APP_NAME")
134136
}).RespondFn(func(request *http.Request) (*http.Response, error) {
135137
*ran = true
136138
response := armappservice.WebAppsClientGetResponse{

cli/azd/pkg/tools/azcli/webapp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ func (cli *azCli) DeployAppServiceZip(
140140

141141
// Deployment Status API only support linux web app for now
142142
if isLinuxWebApp(app) {
143-
if err := client.DeployTrackStatus(ctx, deployZipFile, subscriptionId, resourceGroup, appName, progressLog); err != nil {
143+
if err := client.DeployTrackStatus(
144+
ctx, deployZipFile, subscriptionId, resourceGroup, appName, progressLog); err != nil {
144145
if !resumeDeployment(err, progressLog) {
145146
return nil, err
146147
}

cli/azd/pkg/tools/dotnet/dotnet.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ func (cli *dotNetCli) PublishAppHostManifest(
141141
) error {
142142
// TODO(ellismg): Before we GA manifest support, we should remove this debug tool, but being able to control what
143143
// manifest is used is helpful, while the manifest/generator is still being built. So if
144-
// `AZD_DEBUG_DOTNET_APPHOST_USE_FIXED_MANIFEST` is set, then we will expect to find apphost-manifest.json SxS with the host
145-
// project, and we just use that instead.
144+
// `AZD_DEBUG_DOTNET_APPHOST_USE_FIXED_MANIFEST` is set, then we will expect to find apphost-manifest.json SxS with the
145+
// host project, and we just use that instead.
146146
if enabled, err := strconv.ParseBool(os.Getenv("AZD_DEBUG_DOTNET_APPHOST_USE_FIXED_MANIFEST")); err == nil && enabled {
147147
m, err := os.ReadFile(filepath.Join(filepath.Dir(hostProject), "apphost-manifest.json"))
148148
if err != nil {
@@ -291,7 +291,7 @@ func (cli *dotNetCli) SetSecrets(ctx context.Context, secrets map[string]string,
291291
}
292292

293293
// dotnet user-secrets now support setting multiple values at once
294-
//https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows#set-multiple-secrets
294+
// learn.microsoft.com/aspnet/core/security/app-secrets?view=aspnetcore-7.0&tabs=windows#set-multiple-secrets
295295
runArgs := newDotNetRunArgs("user-secrets", "set", "--project", project).
296296
WithStdIn(strings.NewReader(string(secretsJson)))
297297

cli/azd/test/mocks/mockai/deployments.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func RegisterListOnlineDeployment(
103103
}
104104

105105
response := armmachinelearning.OnlineDeploymentsClientListResponse{
106-
OnlineDeploymentTrackedResourceArmPaginatedResult: armmachinelearning.OnlineDeploymentTrackedResourceArmPaginatedResult{
106+
OnlineDeploymentTrackedResourceArmPaginatedResult: armmachinelearning.
107+
OnlineDeploymentTrackedResourceArmPaginatedResult{
107108
Value: deployments,
108109
},
109110
}

0 commit comments

Comments
 (0)