[
https://issues.apache.org/jira/browse/BEAM-14243?focusedWorklogId=763927&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-763927
]
ASF GitHub Bot logged work on BEAM-14243:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Apr/22 23:00
Start Date: 28/Apr/22 23:00
Worklog Time Spent: 10m
Work Description: jrmccluskey commented on code in PR #17479:
URL: https://github.com/apache/beam/pull/17479#discussion_r861367834
##########
sdks/go/pkg/beam/staticcheck.conf:
##########
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# TODO(BEAM-14371): Clean up instances of S1021 (merge variable declaration
and assignment) and enable check
+# TODO(BEAM-14372): Clean up instances of U1000 (unused fields, vars,
functions) and enable check
+checks = ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021",
"-ST1022", "-ST1023", "-SA1019", "-U1000", "-S1021"]
+initialisms = ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID",
"HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA",
"SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID",
"URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP",
"DB", "TS"]
+dot_import_whitelist = ["github.com/mmcloughlin/avo/build",
"github.com/mmcloughlin/avo/operand", "github.com/mmcloughlin/avo/reg"]
Review Comment:
This is the actual configuration file that staticcheck uses. This is the
default config
(https://staticcheck.io/docs/configuration/#example-configuration) with the
addition of skipping three other checks. In the event that we cleaned up the
extra warnings from things like deprecations we could remove this, but as we've
discussed the deprecation warnings are a decently sized project and getting
some signal from this sooner is better
Issue Time Tracking
-------------------
Worklog Id: (was: 763927)
Time Spent: 2h (was: 1h 50m)
> Add staticcheck to Go Github Actions precommits
> -----------------------------------------------
>
> Key: BEAM-14243
> URL: https://issues.apache.org/jira/browse/BEAM-14243
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Jack McCluskey
> Priority: P2
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Add [staticcheck
> tool|https://staticcheck.io/docs/running-staticcheck/ci/github-actions/] to
> the Go SDK GitHub Actions suite to run as an additional precommit. Should
> only be done after the SDK's existing staticcheck warnings are addressed.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)