Skip to content

Commit 983920a

Browse files
committed
Ignore preexisting tfproviderlint issues
1 parent 7548364 commit 983920a

39 files changed

+55
-12
lines changed

gitlab/data_source_gitlab_group_membership.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func dataSourceGitlabGroupMembershipRead(d *schema.ResourceData, meta interface{
123123
d.Set("group_id", group.ID)
124124
d.Set("full_path", group.FullPath)
125125

126-
d.Set("members", flattenGitlabMembers(d, gm))
126+
d.Set("members", flattenGitlabMembers(d, gm)) // lintignore: XR004 // TODO: Resolve this tfproviderlint issue
127127

128128
var optionsHash strings.Builder
129129
optionsHash.WriteString(strconv.Itoa(group.ID))

gitlab/data_source_gitlab_project.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func dataSourceGitlabProject() *schema.Resource {
9999
Type: schema.TypeBool,
100100
Computed: true,
101101
},
102+
// lintignore: S031 // TODO: Resolve this tfproviderlint issue
102103
"push_rules": {
103104
Type: schema.TypeList,
104105
MaxItems: 1,
@@ -199,7 +200,7 @@ func dataSourceGitlabProjectRead(d *schema.ResourceData, meta interface{}) error
199200
return fmt.Errorf("Failed to get push rules for project %q: %w", d.Id(), err)
200201
}
201202

202-
d.Set("push_rules", flattenProjectPushRules(pushRules))
203+
d.Set("push_rules", flattenProjectPushRules(pushRules)) // lintignore: XR004 // TODO: Resolve this tfproviderlint issue
203204

204205
return nil
205206
}

gitlab/data_source_gitlab_projects.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// lintignore: S031 // TODO: Resolve this tfproviderlint issue
2+
13
package gitlab
24

35
import (
@@ -166,9 +168,11 @@ func flattenProjects(projects []*gitlab.Project) (values []map[string]interface{
166168
}
167169

168170
func dataSourceGitlabProjects() *schema.Resource {
171+
// lintignore: S024 // TODO: Resolve this tfproviderlint issue
169172
return &schema.Resource{
170173
Read: dataSourceGitlabProjectsRead,
171174

175+
// lintignore: S006 // TODO: Resolve this tfproviderlint issue
172176
Schema: map[string]*schema.Schema{
173177
"max_queryable_pages": {
174178
Type: schema.TypeInt,

gitlab/data_source_gitlab_projects_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
1212
)
1313

14+
// lintignore: AT003 // TODO: Resolve this tfproviderlint issue
1415
func TestAccDataGitlabProjectsSearch(t *testing.T) {
1516
projectName := fmt.Sprintf("tf-%s", acctest.RandString(5))
1617

@@ -50,6 +51,7 @@ func TestAccDataGitlabProjectsSearch(t *testing.T) {
5051
})
5152
}
5253

54+
// lintignore: AT003 // TODO: Resolve this tfproviderlint issue
5355
func TestAccDataGitlabProjectsGroups(t *testing.T) {
5456
projectName := fmt.Sprintf("tf-%s", acctest.RandString(5))
5557
groupName := fmt.Sprintf("tf-%s", acctest.RandString(5))

gitlab/data_source_gitlab_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func dataSourceGitlabUserRead(d *schema.ResourceData, meta interface{}) error {
199199
d.Set("state", user.State)
200200
d.Set("external", user.External)
201201
d.Set("extern_uid", user.ExternUID)
202-
d.Set("created_at", user.CreatedAt)
202+
d.Set("created_at", user.CreatedAt) // lintignore: R004,XR004 // TODO: Resolve this tfproviderlint issue
203203
d.Set("organization", user.Organization)
204204
d.Set("two_factor_enabled", user.TwoFactorEnabled)
205205
d.Set("note", user.Note)

gitlab/data_source_gitlab_users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func dataSourceGitlabUsersRead(d *schema.ResourceData, meta interface{}) error {
194194
page = page + 1
195195
}
196196

197-
d.Set("users", flattenGitlabUsers(users))
197+
d.Set("users", flattenGitlabUsers(users)) // lintignore: XR004 // TODO: Resolve this tfproviderlint issue
198198
d.SetId(fmt.Sprintf("%d", id))
199199

200200
return nil

gitlab/provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func init() {
1515
if os.Getenv(resource.TestEnvVar) != "" {
1616
testAccProvider = Provider().(*schema.Provider)
1717
if err := testAccProvider.Configure(&terraform.ResourceConfig{}); err != nil {
18-
panic(err)
18+
panic(err) // lintignore: R009 // TODO: Resolve this tfproviderlint issue
1919
}
2020
testAccProviders = map[string]terraform.ResourceProvider{
2121
"gitlab": testAccProvider,

gitlab/resource_gitlab_branch_protection.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ func resourceGitlabBranchProtectionRead(d *schema.ResourceData, meta interface{}
159159
}
160160
}
161161

162+
// lintignore: R004 // TODO: Resolve this tfproviderlint issue
162163
if err := d.Set("allowed_to_push", convertAllowedToToBranchAccessDescriptions(pb.PushAccessLevels)); err != nil {
163164
return fmt.Errorf("error setting allowed_to_push: %v", err)
164165
}
166+
// lintignore: R004 // TODO: Resolve this tfproviderlint issue
165167
if err := d.Set("allowed_to_merge", convertAllowedToToBranchAccessDescriptions(pb.MergeAccessLevels)); err != nil {
166168
return fmt.Errorf("error setting allowed_to_merge: %v", err)
167169
}

gitlab/resource_gitlab_deploy_key_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func TestAccGitlabDeployKey_suppressfunc(t *testing.T) {
7373
})
7474
}
7575

76+
// lintignore: AT002 // TODO: Resolve this tfproviderlint issue
7677
func TestAccGitlabDeployKey_import(t *testing.T) {
7778
rInt := acctest.RandInt()
7879
resourceName := "gitlab_deploy_key.foo"

gitlab/resource_gitlab_deploy_token.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
)
1414

1515
func resourceGitlabDeployToken() *schema.Resource {
16+
// lintignore: XR002 // TODO: Resolve this tfproviderlint issue
1617
return &schema.Resource{
1718
Create: resourceGitlabDeployTokenCreate,
1819
Read: resourceGitlabDeployTokenRead,
@@ -164,7 +165,7 @@ func resourceGitlabDeployTokenRead(d *schema.ResourceData, meta interface{}) err
164165
d.Set("username", token.Username)
165166

166167
if token.ExpiresAt != nil {
167-
d.Set("expires_at", token.ExpiresAt)
168+
d.Set("expires_at", token.ExpiresAt) // lintignore: R004,XR004 // TODO: Resolve this tfproviderlint issue
168169
}
169170

170171
for _, scope := range token.Scopes {

0 commit comments

Comments
 (0)