rstcheck / rstcheck-core

Core library behind rstcheck.
http://rstcheck-core.rtfd.io/
MIT License
4 stars 8 forks source link

[Bug]: code-block errors (maybe only for cpp?) are not descriptive enough #64

Closed ReenigneArcher closed 1 year ago

ReenigneArcher commented 1 year ago

To Dos

Example Code (rst)

unknown

Relevant log output

/tmp/tmpxot4m_ij.cpp:52: (ERROR/3) (cpp) error: expected constructor, destructor, or type conversion before ‘(’ token

Description

It seems that this library creates a temporary file for code blocks (at least for c++ code blocks). The error message is not descriptive enough to find the problematic code-block within the rst files.

Operating System

Linux

Operating System Details

Ubuntu 22.04

Python Version

3.11

rstcheck Version

6.1.2

Additional Context

No response

Cielquan commented 1 year ago

You are right. It would be better if instead of the tmp file path the file with the code directive and the line of in there would be shown.

PR welcome 😉

EDIT: This issue should only happen with C, C++ or bash code blocks, because only these are written to tmp files.

Cielquan commented 1 year ago

Fixed in rstcheck-core 1.1.1