Improve `cpp/wrong-type-format-argument` by adding correct formatting specifier
Đang mở
question
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
**Description of the issue**
Currently the `cpp/wrong-type-format-argument` diagnostic displays something like this
```
This argument should be of type 'int' but is of type 'unsigned long'.
```
It would be even more helpful if the diagnostic message would include the correct formatting specifier so it would look something like this:
```
This argument should be of type 'int' but is of type 'unsigned long'. Consider using '%ul' instead.
```
For reference [cppreference](https://en.cppreference.com/w/c/io/fprintf) has a great table about which specifier is needed for which type.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.