Author Topic: Underlining Errors in editor before compilation/building  (Read 859 times)

Offline kakas

  • Multiple posting newcomer
  • *
  • Posts: 25
  • potatoes are tasty(not the raw ones)
Underlining Errors in editor before compilation/building
« on: April 08, 2024, 08:26:56 am »
When I write gibberish in the editor and save the file. Code Blocks doesn't seem to be aware of the error.
It's only when I try to build the project it gives an error. That too just a mark on the corresponding line in the editor and not the specific word.

I don't know if I am supposed to install some external extension or simple turn on something in the settings.
I searched up this problem and visited multiple issues, but they were all about syntax highlighting issues.
(Idk how attaching images to post works, I tried)

Offline nenin

  • Almost regular
  • **
  • Posts: 227
Re: Underlining Errors in editor before compilation/building
« Reply #1 on: April 08, 2024, 11:05:58 am »
Hate to say that, but highlighting is not a spellchecking. It is just enhance readability of the code, nothing more.
You can detect errors in C/C++ only by compiler or tools like lint.

Offline kakas

  • Multiple posting newcomer
  • *
  • Posts: 25
  • potatoes are tasty(not the raw ones)
Re: Underlining Errors in editor before compilation/building
« Reply #2 on: April 08, 2024, 08:41:39 pm »
Is there anyway to get code blocks to highlight/underline specific errors in editor before compiling?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2785
Re: Underlining Errors in editor before compilation/building
« Reply #3 on: April 09, 2024, 06:21:37 am »
Is there anyway to get code blocks to highlight/underline specific errors in editor before compiling?

You might want to look at the CodeBlocks Nightly builds section. It contains CodeBlocks with a Clangd_client plugin which marks error in the left margin when you save a file.
https://forums.codeblocks.org/index.php/board,20.0.html

See this in order to enable it:
https://wiki.codeblocks.org/index.php/CB_Clangd_Client

Offline kakas

  • Multiple posting newcomer
  • *
  • Posts: 25
  • potatoes are tasty(not the raw ones)
Re: Underlining Errors in editor before compilation/building
« Reply #4 on: April 09, 2024, 07:18:13 am »
Is there anyway to get code blocks to highlight/underline specific errors in editor before compiling?

You might want to look at the CodeBlocks Nightly builds section. It contains CodeBlocks with a Clangd_client plugin which marks error in the left margin when you save a file.
https://forums.codeblocks.org/index.php/board,20.0.html

See this in order to enable it:
https://wiki.codeblocks.org/index.php/CB_Clangd_Client
Thanks  :D!!!