Coder Social home page Coder Social logo

mt40 / vscode-todo-parser Goto Github PK

View Code? Open in Web Editor NEW
54.0 5.0 13.0 14.18 MB

TodoParser extension for vscode. Parse TODOs in your project.

Home Page: http://kantlove.github.io/vscode-todo-parser

License: MIT License

TypeScript 67.95% Java 2.64% C# 4.56% Python 1.60% C++ 1.17% JavaScript 17.61% Shell 0.11% C 0.16% CSS 0.99% Elixir 0.96% F# 0.64% Go 0.20% Haskell 0.21% Lua 0.21% PHP 0.47% R 0.09% Ruby 0.08% CoffeeScript 0.06% PowerShell 0.21% MATLAB 0.08%
vscode vscode-todo-parser marketplace typescript extension

vscode-todo-parser's Introduction

VSCode TODO Parser Extension

marketplace marketplace-installs marketplace-rating

GitHub issues Travis GitHub

GUYS, I'M SORRY FOR THE SLOW RESPONSE AND MAINTAINANCE

Sometimes it is the job that you want prevents you from working on the project that you nurture :(

Parse TODOs in your working files.

Demo

Install

  • Visit the Market here.
  • Or open VSCode, press F1 then type this command ext install minhthai.vscode-todo-parser. Press Enter to install.

Features

Parse TODOs in the current document:

  • Open a file.

  • The TODO Counter on Status Bar shows the number of TODO in the current document.

    status bar

  • Click on the Counter to parse TODOs in the current document..

  • Alternatively, in the F1 command menu, select Parse TODOs (current document).

Parse TODOs in the project:

  • Press F1 > Parse TODOs (all files).

Note that for large projects, the result will be displayed gradually. You can see the progress at the bottom (the bolt icon โšก). Clicking on it will cancel the task.

progress

We support both single-line and multi-line comments. For example:

// TODO: this todo is valid

/* TODO: this is also ok */

/* It's a nice day today
 *
 * Todo: multi-line TODOs are
 * supported too!
 */

Settings

Include the below snippet in your User Settings (File > Preferences > User Settings).

"TodoParser": {
  "exclude": ["cpp", "c"],
  "include": ["js"],
  "folderExclude": ["node_modules", ".vscode"],
  "only": ["sub-folder/sub-sub-folder"],
  "showInProblems": false,
  "markers": ["NOTE:", "REMINDER:", ["FIXME", "Warning"]],
  "autoDefaultMarkers": true
}

exclude

Set which file extension you want to exclude. For example, "exclude": ["cpp"] will exclude all *.cpp files from Parse TODOs (all files).

include

Set which file extension you want to include. If both include and exclude entry exist, include is prefered (ignore value of exclude).

folderExclude

Set which folder you want to exclude. Allowed values are folder names only (not directory path).

only

Set which folder you want to focus on.

If both only and folderExclude exist, only is prefered. In that case, folderExclude entry will work inside these only folders.

Each item is a path under the root folder. For example:

  • Your project structure is:
root
|-src
|  |--common
|  +--models
|     |--item.ts
|     +--test
+-static
  • And you only want to focus on the root/src/models folder. But you'd like to ignore the root/src/models/test folder. Then your setting should be:
"TodoParser": {
  "folderExclude": ["test"],
  "only": ["src/models"]
}

showInProblems

If true, show the results in the Problems panel instead of the Output panel.

markers

Contains the words that signal the start of TODOs. It can contain either strings, or tuples of [marker string, priority] pairs.

Priority can be either of these strings (sorted by severity, lowest to highest):

  • "Hint"
  • "Information"
  • "Warning"
  • "Error"

Example usage:

  • "markers": ["NOTE:"] will enable matching NOTE: this is a new type of TODO.
  • "markers": [ ["FIXME:", "Warning"] ] will enable matching FIXME: This is important and will mark it as a warning in the Problems panel.

autoDefaultMarkers

If true, automatically add the default "TODO" marker. Default is true.

Supported languages

Java, Javascript, C#, C, C++, F#, Python, Ruby, Coffee Script, R, Haskell, Lua, Go, Perl, Markdown, Css, Scss, Less, Latex, Typescript, Elixir, Shell Script, Twig, Visual Basic, Matlab.

Note that multi-line comment style is only supported in languages that have the syntax in the example.

Contribution

This is a small project by a passionate student so any contribution is welcome and loved ๐Ÿ‘

vscode-todo-parser's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-todo-parser's Issues

Can't get todos to parse

vscode 1.81
todoparser 1.85
macOS: Sierra (but same issue on Windows 10)

Extension installs fine but after add a todo (e.g. // TODO: this is a todo) and running the parser, the output window shows No TODOs found.

Add an option for parsing all file by default

The icon for now only display the todo in the current file.
image

Can you add an option to transform it to display the same result as the "Parse TODO (all files)" method. And see all TODOs in the project on the icon and on the clic on the icon.

Thanks

Avoid triggering other extensions when read file content.

Moved here from #19.

When I run "ParseTODOs (all files)" all files are processed to find TODOs but in the same time other TS Code extensions are invoked - namely "Stylelint" and "Spelling and Grammar Checker" and they process those files also. It is a very frustrating effect.

[Request] Add a todo count in tray and support for more multi-line comments

That addon is a great tool.

I'd like to request some things.

First I'd like to have a count in the tray for the current file or the work files (can be changed), a bit like that:
capture

Secondly, I'd like to have support for TODOs like that:

// TODO: This is a todo with
// many lines
// and it is currently not supported

It currently gives

1.
File Untitled-1. Line 0, column 0
----------------------------------
TODO: This is a todo with

but should give

1.
File Untitled-1. Line 0, column 0
----------------------------------
TODO: This is a todo with many lines and it is currently not supported

Add support for cmake and nsis languages

Can you add support for cmake and nsis languages, they both use python-style single-line comments.
Adding the following lines to LanguageTypes.js seems to do the job:

LanguageName.CMAKE = new LanguageType("cmake", new RegexType_1.RegexType(all_2.RG_PYTHON));
LanguageName.NSIS = new LanguageType("nsis", new RegexType_1.RegexType(all_2.RG_PYTHON));

Habillity to accept "@TODO"

First of all, many thanks for this awesome plugin.

I was wondering if we could be able to parse @TODO as well.

I use TODO as JSDocs and I have to remove @ to be able to read on the list.

Thanks

Support for "# TODO:" style Todo

This would be awesome if you could add such a functionality.

Lots of languages use this kind of comments such as Python, Elixir, Bash...

No TODO list

It parses and finds my todo's, but they aren't displayed anywhere? From the screenshot, it looks like there is supposed to be a group in the explorer, but I don't see anything 8-(

Matlab language support

It would be great if extension supports independent parsing of todos rather than in comments.
Otherwise it would be awesome if extension supports MATLAB.

Link to files with spaces do not work

I have space in filenames and paths and the parsed list cuts the link at the first space so clicking on the link ends up trying to open a file that does not exist at this point.

parse html (and html-like) files

best vscode todo tools! but currently not support html <!-- TODO: ..... -->

furthermore, when developping with vue, we always write js\coffee\โ€ฆ code directly in .the < script> part of a .vue file (can be treated as a html file), and write css directly in .vue file's < style> part.

so in a html or html-like file, it may have three or more types of todos to be parsed: html's < !-- ... -z>, js //, coffee #, css /* ... */.

Can't get it work with vscode 1.4

Hi guys. I see an empty output panel when I run the "todo (all files)" command, while todos are clearly there:

At first I thought that the node_modules folder is too big, so I excluded it in the settings

"TodoParser": {
    "exclude": ["node_modules"]
 }

but it makes no difference. I tried different formats

// todo: x
// Todo: x
// TODO: x
//todo: x

with no luck.

I see that parser is doing something, because I see spawning helpers when I run the command:

Also the command for the current file sometimes throws an exception. It looks like a random error.

P.S. I never tried it with code < 1.4 so I cannot confirm if it's new behavior.

Unable to parse pre-existing TODOs in docuemnts

I have a number of TODO lines in comment doc blocks in an existing code base.

todo-parser does not pick them up It wil lonly register new TODOs as I type new ones in

Here is an example of one of my pre existing comments

/**
 * All the client based routes
 *
 * TODO: Possible Engine?
 *
 * @param   {String}
 * @param   {Function}
 * @private
 */

/ is stripped from within TODO comments

The '/' character seems to be removed from the text of TODO comments; eg:
TODO scale axis to get metres/feet
Perhaps this is an unanticipated consequence of having to remove //, /*, etc, from comment strings.

Fails to navigate to TODO location from OUTPUT Panel

Whenever I "command-click" a todo link I get the following error:

Error: Unable to open 'my.service.js#209': File not found(/Users/justin/src/js/project/src/endpoint/my.service.js#209).

This file path is correct and I can verify by doing an $ ls on the path.

From file:///Users/justin/src/js/project/src/endpoint/my.service.js#209
----------------------------------
todo:(justin) Finish the validation

==================================
Found 1 TODO.

todo_parser_error

  • MacOS Sierra 10.12.4
  • VS Code 1.11.2

Feature Request Markdown

You could support defining for a type, what to look for.

For example, for an mdown or md document, look for TODO: for the type TODO.
For example, for an mdown or md document, look for TASK:for the type TASK

Now, all is a todo. and there is always need for a //TODO. But in a markdown, a simple TODO: should suffice.

In the output window, there should be a grouping for all types. E.g.
TODO
Todo: Make sure this work
Todo: Need a conference call

TASK
Task: Need to delegate
Task: Group all the things

Line and Column not listed

Unlike in the documentation animation, the output pane doesn't list the line and column of TODO items. Probably as a consequenceparse, Ctrl-clicking on each item does nothing. I've tried with .js and .java.

1.
From c:\Users\Peter M\Documents\Development\Web\apache\concrete5_dirty\application\blocks\gond_read_more_bottom\temp.java
----------------------------------
todo: finish me

==================================
Found 1 TODO.

I apologise if I'm just doing something dumb!

TODO markers should only be detected at comment start

Currently, comments such as
// Here, we look for strings containing TODO
are picked up as TODO tasks. This is rarely a problem when using TODO, but can be more of a problem when using other markers. Would it be preferable to ensure that the marker is at the start of the comment text before considering it to be a task?

show todo's of all files in current project

It might be an unperformant operation, but could you show all todo's that are present in the current opened folder? I would really appreciate a side window where you can go through them since I got used to "todo bookmark" a lot of source files in other IDEs where that was supported.

todo-parser shows @returns at the report

Hi,

when I use the following JsDoc syntax in JS source file:

/**
 * @description - Removing an ordered product from a bin with a dialog confirmation.
 * @param {string} _idProductOrder - Unique key of an ordered product.
 * @todo ML - Discuss to be sure that '_idProductOrder' is not only an id of a product.
 * @returns void
 */

the following report is displayed -> "@returns void" is something what should not be included in it:

1.
From c:\Data\Projects\....\OrderedProductsPanel.component.ts:110
----------------------------------
@todo ML - Discuss to be sure that '_idProductOrder' is not only an id of a product.
@returns void

My config:

"TodoParser": {
        "exclude": ["cpp", "c"],
        "folderExclude": ["node_modules", ".vscode", "typings"],
        "markers": ["@todo"]
}

Environment:

  • Windows 8.1
  • node 0.12.15
  • VS Code 1.4.0
  • todo-parser 1.7.2

Cached response

Love the extension but it seems to be stuck in returning a cached response for me. I'm getting the todo I first added, but after updating the file in question with several more (and also removing the first todo), I'm still getting that first todo returned (and none of the new ones).

can't click the file in the list

In typescript files, the results aren't clickable, so the only way to go to the todo is to manually open the file then go to that line.

Parse TODOs (all files) not working

When executing "Parse TODOs (all files)" the activity monitor in osx shows "code helper" running at +100% and the laptop fans start after a while. It never shows the output and I have to restart and kill the process to manage the CPU.

screen shot 2016-08-12 at 13 41 41

VS Code hangs when using ParseTODOs (all files)

Hi,

I have a problem when using the command "ParseTODOs (all files)". VS Code hangs immediately. On individual documents it works as supposed.

My config:

"TodoParser": {
        "exclude": ["cpp", "c"],
        "folderExclude": ["node_modules", ".vscode", "typings"],
        "markers": ["@todo"]
}

Environment:

  • Windows 8.1
  • node 0.12.15
  • VS Code 1.4.0
  • todo-parser 1.7.2

Feature request: Group by Marker

Right now it is laid out like:

1.
From Untitled-1:5
----------------------------------
FIX: Text 1

2.
From Untitled-1:6
----------------------------------
TODO: text 2 -->

3.
From Untitled-1:9
----------------------------------
FIX: Text 3

==================================
Found 3 TODOs.

but, something like the following may be more helpful:

Marker: TODO
---------------
Untitled-1:6 test 2

Marker: FIX
--------------
Untitled-1:5 Test 1
Untitled-1:9 Test 3

Extension annoying

Hey,

your extension is great, but very annoying for extension developers. Every time I am in debugging mode and switch between files, the extension reject the error. Please fix it.

Best regards

Feature Request: Could you implement the exclude feature for markers setting?

markers
Contains the words that signal the start of TODOs. For example, "markers": ["NOTE:"] will enable matching NOTE: this is a new type of TODO.
Note that "TODO:", "Todo:", and "todo:" are added by default.

For example , I added {"markers": ["Refactoring:"] } to my user settings.json, I hope todo-parser only lists "Refactoring:" items to me, excludes default "TODO:" , "Todo:" and "todo:" , because existed Todos were marked by other people, I don't care them.

Maybe we can improve the settings file ,just like
{"markers": ["!TODO:","!Todo:","Refactoring:"] }

Thanks

Feature Request: Show checkboxes in `TODO` items panel, remove `TODO` comment when clicked

Description

  • Show checkboxes in the panel
  • When checkbox is clicked, associated TODO item in code is deleted
  • Option to move checked items into CHANGELOG, if exists('CHANGELOG.md')

Caveats

  • Not sure how to handle cases where TODO items are checked (marked done), then unchecked (not done) subsequently thereafter. Would just a stored 'undo' operation solely suffice in this case? Perhaps the CHANGELOG.md would work as a buffer solution.

Feature Request: parse LaTeX files

It would be great to be able to use you extension for LaTeX files also!
Comments start with a % and take all the rest of the line.

Thanks!

Twig support

Would it be possible to add Twig support?
There's only one comment format:

{# TODO: twig support #}

And the target would be *.twig files.

Dont work - Parse TODOs (all files)

vers:
TODO Parser - 1.8.7
VSCode - 1.11.0-insider

Steps:

  1. Press F1 > Parse TODOs (all files)
  2. Click to "TODO Counter"
  3. No reaction
  4. Open console:
shell.ts:468 Previous work is not finished.: AssertionError: Previous work is not finished.
    at Function.OutputWriter.begin (C:\Users\xxx\.vscode-insiders\extensions\minhthai.vscode-todo-parser-1.8.7\out\src\classes\OutputWriter.js:22:9)
    at C:\Users\xxx\.vscode-insiders\extensions\minhthai.vscode-todo-parser-1.8.7\out\src\types\CommandType.js:15:36
    at process._tickCallback (internal/process/next_tick.js:103:7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.