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

Remove redundant parenthesis #727

Merged
merged 2 commits into from Aug 16, 2018
Merged

Remove redundant parenthesis #727

merged 2 commits into from Aug 16, 2018

Conversation

tmthrgd
Copy link
Collaborator

@tmthrgd tmthrgd commented Aug 16, 2018

These were caught with:

gofmt -r '(a) -> a' -w *.go

I decided to exclude the following change because, although it is correct, it doesn't look as clear to me. I can include it if you disagree.

diff --git a/msg_helpers_test.go b/msg_helpers_test.go
index adceb882c5..dccc539248 100644
--- a/msg_helpers_test.go
+++ b/msg_helpers_test.go
@@ -92,7 +92,7 @@ func TestPackDataNsec(t *testing.T) {
        for _, tt := range tests {
                t.Run(tt.name, func(t *testing.T) {
                        got, err := packDataNsec(tt.args.bitmap, tt.args.msg, tt.args.off)
-                       if (err != nil) != tt.wantErr {
+                       if err != nil != tt.wantErr {
                                t.Errorf("packDataNsec() error = %v, wantErr %v", err, tt.wantErr)
                                return
                        }

These were caught with:
    gofmt -r '(a) -> a' -w *.go

This commit only includes the changes where the formatting makes the
ordering of operations clear.
These were caught with:
    gofmt -r '(a) -> a' -w *.go

This commit includes the remaining changes where the formatting does not
make the ordering of operations as clear as the previous commit.
@tmthrgd tmthrgd requested a review from miekg August 16, 2018 08:24
@codecov-io
Copy link

codecov-io commented Aug 16, 2018

Codecov Report

Merging #727 into master will decrease coverage by 0.03%.
The diff coverage is 97.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
- Coverage   55.76%   55.72%   -0.04%     
==========================================
  Files          39       39              
  Lines       10745    10745              
==========================================
- Hits         5992     5988       -4     
- Misses       3670     3673       +3     
- Partials     1083     1084       +1
Impacted Files Coverage Δ
labels.go 93.39% <100%> (ø) ⬆️
scan_rr.go 68.88% <100%> (ø) ⬆️
dnssec.go 58.27% <100%> (ø) ⬆️
client.go 58.8% <100%> (ø) ⬆️
types.go 68.2% <100%> (ø) ⬆️
msg.go 78.71% <100%> (-0.63%) ⬇️
edns.go 14.94% <100%> (ø) ⬆️
server.go 62% <100%> (ø) ⬆️
msg_helpers.go 52.16% <75%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 208cd1e...e4dac0a. Read the comment docs.

@miekg
Copy link
Owner

miekg commented Aug 16, 2018 via email

@miekg miekg merged commit c9b812d into miekg:master Aug 16, 2018
@tmthrgd tmthrgd deleted the gofmt branch August 16, 2018 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants