Add 2019.2.2 release notes
</ul></li>
<li><a href="#sustainable-open-source">Sustainable open source and a personal plea</a></li>
<li><a href="#2019.2.1">Staticcheck 2019.2.1 release notes</a></li>
+ <li><a href="#2019.2.2">Staticcheck 2019.2.2 release notes</a></li>
</ul>
<h2 id="performance">Performance improvements</h2>
@@ -347,14 +348,11 @@ Dependencies:
<li>{{ check "SA4021" }} flags calls to append with a single argument, as <code>x = append(y)</code> is equivalent to <code>x = y</code>.</li>
<li>{{ check "SA5008" }} flags certain kinds of invalid struct tags.</li>
<li>{{ check "SA5009" }} verifies the correctness of Printf calls.</li>
- <li>
- {{ check "SA6005" }} flags inefficient string comparisons
- involving <code>strings.ToLower</code>
+ <li>{{ check "SA6005" }} flags inefficient string comparisons involving <code>strings.ToLower</code>
or <code>strings.ToUpper</code> when they can be replaced with <code>strings.EqualFold</code>.
</li>
<li>{{ check "SA9005" }} flags attempts at marshaling structs with no public fields nor custom marshaling.</li>
- <li>
- {{ check "ST1017" }} flags so-called <a href="https://en.wikipedia.org/wiki/Yoda_conditions">yoda conditions</a>,
+ <li>{{ check "ST1017" }} flags so-called <a href="https://en.wikipedia.org/wiki/Yoda_conditions">yoda conditions</a>,
which take the form of <code>if 42 == x</code>.
</li>
<li>{{ check "ST1018" }} flags string literals containing zero-width characters.</li>
@@ -425,3 +423,20 @@ Dependencies:
The 2019.2 release has an unfortunate bug that prevents staticcheck from running on 32-bit architectures, causing it to crash unconditionally.
This release fixes that crash.
</p>
+
+<h2 id="2019.2.2">Staticcheck 2019.2.2 release notes</h2>
+
+<p>
+ Staticcheck 2019.2.2 contains the following user-visible fixes:
+</p>
+
+<ul>
+ <li>{{ check "S1008" }} now skips if/else statements where both branches return the same value.</li>
+ <li>{{ check "SA4006" }} now considers a value read when a switch statement reads it, even if the switch statement has no branches.</li>
+ <li>2019.2 introduced a bug that made it impossible to enable non-default checks via configuration files. This is now possible again.</li>
+ <li>2019.2 introduced a bug that made the <code>-tags</code> command line argument ineffective, making it impossible to pass in build tags. This is now possible again.</li>
+ <li>From this release onward, we will use pseudo versions of the form
+ <code>v0.0.<strong>1</strong>-&lt;year&gt;.&lt;minor&gt;</code> instead of <code>v0.0.<strong>0</strong>-&lt;year&gt;.&lt;minor&gt;</code>.
+ This fixes an issue where <code>go get</code> would prefer an older commit over a newer released version due to the way versions sort.
+ </minor>
+</ul>
