How to setup IntelliJ to recognize Scala's "???" method as a TODO
Asked Answered
F

1

6

I'd like to see all occurrences of ??? in the IntelliJ TODO list (or in any other way to be able to see a list of all unimplemented methods in my Scala project). It seems adding the pattern \b\?\?\?\b.* in the TODO settings doesn't work.

Freeness answered 27/7, 2015 at 12:18 Comment(1)
I use two workarounds: 1) I always add a TODO comment after a ???, describing in short words what needs to be done here. 2) Whenever I use ??? in the code, I always write a test case that fails because of the ???. - If you use both of the suggestions, you can be pretty sure that you won't forget a ???. Plus, you'll have a comment containing a bit more detail for your fellow developers, and a test case.Libby
R
2

Intellij allows you to create custom TODO patterns.

In your TODO window click on the filters icon > Edit Filters > Add new pattern.

Once you add a new pattern Intellij will rescan your project and add the new TODOs to the list.

Official JetBrains TODO Example

Update:

As per comments, I did a quick test and it doesn't look like it's possible to scan for TODOs outside comments.

Rabush answered 27/7, 2015 at 13:16 Comment(1)
He already said that \b\?\?\?\b.* didn't work (which makes sense as I'd expect that those patterns are only looked for inside comments), so this does not seem helpful.Gardas

© 2022 - 2024 — McMap. All rights reserved.