Skip to content

Conversation

Copy link
Contributor

Copilot AI commented May 28, 2025

Issue

When similar warnings are grouped in the emacs output format, their descriptions were being truncated with ..., making the output less useful. For example, warnings like This format specifier for type ' ... were being displayed instead of the full message like This format specifier for type 'int' does not match the argument type 'unsigned long'.

Changes Made

  • Modified the emacs output template to show the complete description for each warning instead of using the truncated key used for grouping
  • Added a condition to only show the description if it exists and is different from the code, preventing duplicate text
  • Updated tests to match the new output format

Example

Before:

Severity : error [1]
dir/abc.c:506: cpp/wrong-type-format-argument This format specifier for type ' ...
dir/def.c:107: cpp/wrong-type-format-argument This format specifier for type ' ...

After:

Severity : error [1]
dir/abc.c:506: cpp/wrong-type-format-argument This format specifier for type 'int' does not match the argument type 'unsigned long'.
dir/def.c:107: cpp/wrong-type-format-argument This format specifier for type 'float' does not match the argument type 'double'.

Fixes #86.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits May 28, 2025 17:30
Co-authored-by: gramster <2762632+gramster@users.noreply.github.com>
Co-authored-by: gramster <2762632+gramster@users.noreply.github.com>
Copilot AI changed the title [WIP] When similar warnings are grouped they shouldn't be truncated in the output Fix truncated warning descriptions in emacs output format May 28, 2025
Copilot AI requested a review from gramster May 28, 2025 17:38
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.

When similar warnings are grouped they shouldn't be truncated in the output

2 participants