History log of /src/usr.bin/xlint/lint1/check-msgs.lua |
Revision | | Date | Author | Comments |
1.22 |
| 01-Mar-2024 |
rillig | tests/lint: remove redundant documentation
|
1.21 |
| 06-Feb-2024 |
rillig | lint: tab-align message numbers in err.c
By replacing block comments with end-of-line comments, the comments take up less space and thus no longer require to be indented by 6 spaces.
The messages and their comments are used in 3 places: the manual page lint.7, the err-msgs.h header for debug mode, and check-msgs.lua to verify that the comments above the message IDs correspond to the actual messages.
No functional change.
|
1.20 |
| 12-Aug-2023 |
rillig | lint: clean up
|
1.19 |
| 10-Jul-2023 |
rillig | lint: ensure that untyped grammar rules are listed
Untyped grammar rules are suspicious because they subtly affect the order in which the grammar actions are performed. This leads to the various bugs mentioned in msg_347.c.
|
1.18 |
| 02-Jul-2023 |
rillig | lint: add initial support for C23
Required by xsrc/external/mit/MesaLib.old, brw_eu_validate.c, which initializes a struct using empty braces: 'return (struct string){};'.
|
1.17 |
| 05-Jul-2022 |
rillig | lint: add additional queries that are not enabled by default
In the last 18 months, several lint warnings have been made adjusted to allow common usage patterns. For example, lint no longer warns about a constant condition in the statement 'do { ... } while (false)' (message 161), as this pattern is well-known in statement-like macros, making it unlikely that the 'false' is a mistake. Another example is casts between unequal pointer types (message 247) for a few well-known patterns that are unlikely to be bugs.
Occasionally, it is useful to query the code for patterns or events that would not justify a warning. These patterns are modeled as predefined queries that can be selected individually, in addition to and independently of the existing warnings and errors.
New queries can be added as needed, in the same way as new warnings. Queries that are deemed no longer used can be deactivated in the same way as warnings that are no longer used.
As long as none of the queries is enabled, they produce a minimal overhead of querying a single global variable. Computations that are more expensive than a few machine instructions should be guarded by any_query_enabled.
https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html
ok christos@
|
1.16 |
| 03-Jul-2022 |
rillig | lint: do not treat message IDs as arithmetic numbers
No functional change.
|
1.15 |
| 03-Jul-2022 |
rillig | lint: remove unused code in consistency checker
|
1.14 |
| 03-Jul-2022 |
rillig | lint: verify that comment above warning_at matches the message
No binary change.
|
1.13 |
| 16-Dec-2021 |
rillig | tests/lint: ensure that tests on a message mention this message
|
1.12 |
| 04-Sep-2021 |
rillig | lint: spell out abbreviations in comments
No functional change.
|
1.11 |
| 15-Jun-2021 |
rillig | tests/lint1: make error handling in the lint1 linter simpler
|
1.10 |
| 14-Apr-2021 |
rillig | lint: add support for C11-isms such as int[static 3]
|
1.9 |
| 28-Feb-2021 |
rillig | tests/lint: shorten code for checking redundancy in files
No functional change.
|
1.8 |
| 28-Feb-2021 |
rillig | tests/lint: keep messages in test files in sync with actual messages
Each of the tests named msg_*.c repeats the template of the message, to make the test somewhat self-contained when viewed in isolation.
This creates a redundancy, and keeping track of this manually is next to impossible. I tried it and failed in 9 cases, even though it has just been 2 months since I myself created the initial files and I knew all the time that this redundancy exists.
Be fool-proof for the future by checking this automatically.
|
1.7 |
| 19-Feb-2021 |
rillig | lint: shorten code in check-msgs.lua
No functional change.
|
1.6 |
| 31-Jan-2021 |
rillig | lint: mention the operator in messages about bit shifts
|
1.5 |
| 02-Jan-2021 |
rillig | lint: fix typo in check-msgs tool
|
1.4 |
| 01-Jan-2021 |
rillig | lint: add missing redundant messages in source code
|
1.3 |
| 01-Jan-2021 |
rillig | lint: align comments with actual message, in the lexer and parser
|
1.2 |
| 01-Jan-2021 |
rillig | lint: align comments in code with actual messages
Redundancy is bad. Especially in this case, separating the format strings from the actual arguments prevents the compiler from cross-checking them.
|
1.1 |
| 31-Dec-2020 |
rillig | lint: check messages and their IDs for consistency
|