<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/tests/usr.bin/xlint/lint1/msg_188.c, branch lockdoc-10.99.5</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>lint: only skip 'unused' warnings after errors, not other warnings</title>
<updated>2023-07-07T06:03:31+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-07-07T06:03:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f260bdb92f361d3b4e3ab9d23e5f0eb4faafd698'/>
<id>f260bdb92f361d3b4e3ab9d23e5f0eb4faafd698</id>
<content type='text'>
Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that.  This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that.  This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: warn about extern declarations outside headers</title>
<updated>2023-03-28T14:44:34+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2023-03-28T14:44:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ea64962370dcb8ab0cef70a139b7d17a37ec97cd'/>
<id>ea64962370dcb8ab0cef70a139b7d17a37ec97cd</id>
<content type='text'>
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html</pre>
</div>
</content>
</entry>
<entry>
<title>tests/lint: make expectation lines in the tests more detailed</title>
<updated>2022-06-16T16:58:35+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2022-06-16T16:58:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=620be17a2e46b87ff4f7c2425542c3f852b2a453'/>
<id>620be17a2e46b87ff4f7c2425542c3f852b2a453</id>
<content type='text'>
This commit migrates msg_100 until msg_199.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit migrates msg_100 until msg_199.</pre>
</div>
</content>
</entry>
<entry>
<title>tests/lint: add test for struct initialization in traditional C</title>
<updated>2021-03-28T15:12:20+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-03-28T15:12:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=788204133577aa60893f162fa5870edb77786689'/>
<id>788204133577aa60893f162fa5870edb77786689</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lint: force each test to declare the expected diagnostics</title>
<updated>2021-02-21T09:07:58+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-02-21T09:07:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=a9ec1e96dc16359848a87a43db56986d0b521dea'/>
<id>a9ec1e96dc16359848a87a43db56986d0b521dea</id>
<content type='text'>
By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By listing the expected diagnostics directly at the code that triggers
the diagnostics, it is easier to cross-check whether the diagnostics
make sense.

No functional change to lint itself.</pre>
</div>
</content>
</entry>
<entry>
<title>lint: add a test for each message produced by lint1</title>
<updated>2021-01-02T10:22:42+00:00</updated>
<author>
<name>rillig</name>
<email>rillig@NetBSD.org</email>
</author>
<published>2021-01-02T10:22:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f42ea02bea1427be8a41fd952470bdf4f834e26e'/>
<id>f42ea02bea1427be8a41fd952470bdf4f834e26e</id>
<content type='text'>
Having a test for each message ensures that upcoming refactorings don't
break the basic functionality.  Adding the tests will also discover
previously unknown bugs in lint.

The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so.  Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.

The interesting details of this commit are in Makefile and
t_integration.sh.  All other files are just auto-generated.

When running the tests as part of ATF, they are packed together as a
single test case.  Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many.  The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having a test for each message ensures that upcoming refactorings don't
break the basic functionality.  Adding the tests will also discover
previously unknown bugs in lint.

The tests ensure that every lint message can actually be triggered, and
they demonstrate how to do so.  Having a separate file for each test
leaves enough space for documenting historical anecdotes, rationale or
edge cases, keeping them away from the source code.

The interesting details of this commit are in Makefile and
t_integration.sh.  All other files are just auto-generated.

When running the tests as part of ATF, they are packed together as a
single test case.  Conceptually, it would have been better to have each
test as a separate test case, but ATF quickly becomes very slow as soon
as a test program defines too many test cases, and 50 is already too
many.  The time complexity is O(n^2), not O(n) as one would expect.
It's the same problem as in tests/usr.bin/make, which has over 300 test
cases as well.</pre>
</div>
</content>
</entry>
</feed>
