SUMMARY In KDevelop, a productive addition to the Problems view would be to list actionable comments, like FIXME, TODO and HACK. This could appear under a separate "Comments" (or "Tasks") tab adjacent to the existing "Parser" tab. This feature should work for comments across multiple languages - starting with // or # - as well as different scopes, like "Current Project" and "Current Document". There is a "TODO marker words" field in Configure → Language Support, which could be used as the user-configurable list of keywords to determine the lines for listing. ADDITIONAL INFORMATION According to the mailing list archive, this was a feature in KDevelop 4.6.0: https://mail.kde.org/pipermail/kdevelop/2014-February/018244.html If this feature is already implemented, but is broken, consider this a bug. A quick look in the source code suggests the logic may be there already (todoextractor.cpp), but not hooked up to a tab for display.
Created attachment 142026 [details] TODOs in Problems tool view TODOs are present in my Problems tool view. Perhaps such comments are not detected with some specific languages or project managers?
FIXME comments are also detected. For example: // TODO: move check into process selection dialog // FIXME: support non-local URLs HACK is not supported. I suppose adding one more detectable keyword should be easy enough.
Thanks for the feedback. Looks like it's specific languages. I'm using Python with a generic project ("KDevGenericManager" according to .kdev4). I just tried a blank session with some simple hello world files. C and C++ are OK, but other languages/markup like these do not show: - Python - JavaScript - CSS - HTML The syntax highlighter - although not directly related - highlights the word HACK in a scary red, so I was under the impression the Problems tab would show these for consistency. Would be a plus to see HACK listed too! I do observe with a test C file that the Problems tool view doesn't list them after the initial save of a new file, or by changing a new document's highlight to C. They do show and start monitoring the document after switching file tabs. SOFTWARE/OS VERSIONS kdevelop: 5.6.2-5 kdevelop-python: 5.6.2-1 Distro: Arch Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2
Created attachment 142027 [details] Test files for checking TODO functionality If it helps, here's some basic files with comments for testing.
> Would be a plus to see HACK listed too! Turns out that simply adding the word HACK (or any other word one uses to mark problems in code) in Configure->Language Support->{TODO marker words} is enough to make it supported. It could be added to the default list alongside TODO and FIXME. Patches for HACK and other languages are welcome.
Looking at the source code again, the file "plugins/clang/duchain/todoextractor.cpp" suggests that Clang is used to extract TODO markers, which would confirm by design it's limited to the C family of languages. A solution could be to add logic to the problem reporter's model that parses commented lines (for any known language) against the list of TODO markers. Maybe there's something in KTextEditor/KPart/duchain (whichever handles the syntax highlighting) that can help filter a document's lines to comments only. My C++ is extremely limited, otherwise I'd give it a stab. A workaround for now could be to add an "external script" that executes: "egrep -n 'FIXME|TODO' %f"