<feed xmlns='http://www.w3.org/2005/Atom'>
<title>godefererr, branch v0.0.1</title>
<subtitle>Analyser that reports incorrectly returned errors from defer closures</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/'/>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2023-05-26T19:35:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-26T19:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=73574b844ef08e52940c16f4bf8f18f06a2796fe'/>
<id>73574b844ef08e52940c16f4bf8f18f06a2796fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add README</title>
<updated>2023-05-26T19:26:45+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-26T19:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=15b6d6ae795fdf95352ee17bbd5160a707995f7e'/>
<id>15b6d6ae795fdf95352ee17bbd5160a707995f7e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add package documentation</title>
<updated>2023-05-26T18:09:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-26T18:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=7e7367c145b9ac3740ee51bc8cf509948138aa8b'/>
<id>7e7367c145b9ac3740ee51bc8cf509948138aa8b</id>
<content type='text'>
Tried the sample code and it looks like the `return err` is not
necessary. The `err` set in `defer` does work find even when using
`return nil`. Oh well, we can adjust that check later if needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tried the sample code and it looks like the `return err` is not
necessary. The `err` set in `defer` does work find even when using
`return nil`. Oh well, we can adjust that check later if needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>functionState: Format fields after doc comment addition</title>
<updated>2023-05-25T23:24:45+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T23:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=ec52bd27685fef75ffe76333989760f3cf551743'/>
<id>ec52bd27685fef75ffe76333989760f3cf551743</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add more detail to the explanation of how the analyser works</title>
<updated>2023-05-25T19:25:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T19:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=00707a7693c67076898556f2f5de2c8db46a0463'/>
<id>00707a7693c67076898556f2f5de2c8db46a0463</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>checkErrorAssignedInDefer: Remove obsolete TODO</title>
<updated>2023-05-25T18:48:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T18:48:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=775991e6a57fddfd69f1cae4d0aee9c234855286'/>
<id>775991e6a57fddfd69f1cae4d0aee9c234855286</id>
<content type='text'>
Since we don't want to bother with functions that return multiple
values, don't actually report a suggested return signature replacement.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we don't want to bother with functions that return multiple
values, don't actually report a suggested return signature replacement.
</pre>
</div>
</content>
</entry>
<entry>
<title>shouldDeclareErrInSignature: Add note about variable declaration line</title>
<updated>2023-05-25T18:47:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T18:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=8102c9e6fe7e12d625718e362abb29bf1ecdb13c'/>
<id>8102c9e6fe7e12d625718e362abb29bf1ecdb13c</id>
<content type='text'>
When I was first coming up with ideas for the project, I thought that
this line is one I might need to report a diagnostic for, but since the
compiler will catch it, we don't need to bother.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When I was first coming up with ideas for the project, I thought that
this line is one I might need to report a diagnostic for, but since the
compiler will catch it, we don't need to bother.
</pre>
</div>
</content>
</entry>
<entry>
<title>Report missing signature declaration with multiple return values</title>
<updated>2023-05-25T18:40:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T18:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=8bcef611f794272203e05e207259ac8d45d558fb'/>
<id>8bcef611f794272203e05e207259ac8d45d558fb</id>
<content type='text'>
The previous message which reported when a function's return signature
didn't declare an error variable didn't work for functions with multiple
return values.

I thought about extending it and coming up with generated variable names
for the non-error types to be able to support automatic fixing, but this
idea ended up being too complicated. Also, I didn't like the idea of an
automated fixer coming up with generated variable names, because you'd
need to manually rename them anyway. That kind of defeats the purpose of
it being automated.

Instead, change the diagnostic message to only refer to the error
variable and recommend what the declared variable name should be based
on the identifier the error was assigned to in the defer.

Modify our multiple return value test functions according to this new
approach.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous message which reported when a function's return signature
didn't declare an error variable didn't work for functions with multiple
return values.

I thought about extending it and coming up with generated variable names
for the non-error types to be able to support automatic fixing, but this
idea ended up being too complicated. Also, I didn't like the idea of an
automated fixer coming up with generated variable names, because you'd
need to manually rename them anyway. That kind of defeats the purpose of
it being automated.

Instead, change the diagnostic message to only refer to the error
variable and recommend what the declared variable name should be based
on the identifier the error was assigned to in the defer.

Modify our multiple return value test functions according to this new
approach.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add identifier documentation comments</title>
<updated>2023-05-25T18:30:38+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T18:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=c7ea2c3d8fd7d4536f04d060cc57307d15a340df'/>
<id>c7ea2c3d8fd7d4536f04d060cc57307d15a340df</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>newFunctionState: Return value instead of pointer</title>
<updated>2023-05-25T17:58:14+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2023-05-25T17:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/godefererr/commit/?id=30edda9d8d1b543976b8c75c86f8504496e6c5b3'/>
<id>30edda9d8d1b543976b8c75c86f8504496e6c5b3</id>
<content type='text'>
Makes more sense to me to show the `&amp;`s when we pass the value as an
argument to functions. That makes it clearer that the functions are
taking a reference type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Makes more sense to me to show the `&amp;`s when we pass the value as an
argument to functions. That makes it clearer that the functions are
taking a reference type.
</pre>
</div>
</content>
</entry>
</feed>
