pgilad / Leasot
Licence: mit
Parse and output TODOs and FIXMEs from comments in your files
Stars: ✭ 729
Programming Languages
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Projects that are alternatives of or similar to Leasot
Todocheck
A static code analyzer for annotated TODO comments
Stars: ✭ 322 (-55.83%)
Mutual labels: productivity, todo, hacktoberfest
Extract Comments
Extract JavaScript code comments from a string or glob of files.
Stars: ✭ 36 (-95.06%)
Mutual labels: comments, parse, extract
Super Productivity
To-do list & time tracker for programmers and other digital workers with Jira, Github, and Gitlab integration
Stars: ✭ 4,505 (+517.97%)
Mutual labels: productivity, todo, hacktoberfest
Dynamic Dark Mode
The smart, automatic Dark Mode toggle for macOS Mojave+
Stars: ✭ 397 (-45.54%)
Mutual labels: automation, hacktoberfest
Excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
Stars: ✭ 25,509 (+3399.18%)
Mutual labels: productivity, hacktoberfest
Verible
Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, and formatter.
Stars: ✭ 384 (-47.33%)
Mutual labels: productivity, hacktoberfest
Ritchie Cli
Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡
Stars: ✭ 437 (-40.05%)
Mutual labels: automation, hacktoberfest
Odin
A programmable, observable and distributed job orchestration system.
Stars: ✭ 405 (-44.44%)
Mutual labels: productivity, automation
Pomoday V2
A keyboard only task management web app
Stars: ✭ 495 (-32.1%)
Mutual labels: productivity, todo
Microsoft Graph Toolkit
Authentication Providers and UI components for Microsoft Graph 🦒
Stars: ✭ 518 (-28.94%)
Mutual labels: todo, hacktoberfest
Octolinker
OctoLinker — Links together, what belongs together
Stars: ✭ 4,853 (+565.71%)
Mutual labels: productivity, hacktoberfest
Vagrant
Vagrant is a tool for building and distributing development environments.
Stars: ✭ 23,108 (+3069.82%)
Mutual labels: automation, hacktoberfest
Home Assistantconfig
🏠 Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to ⭐ it. Updated FREQUENTLY!
Stars: ✭ 3,687 (+405.76%)
Mutual labels: automation, hacktoberfest
Comments
Native comments for your Laravel application.
Stars: ✭ 390 (-46.5%)
Mutual labels: hacktoberfest, comments
Cds
Enterprise-Grade Continuous Delivery & DevOps Automation Open Source Platform
Stars: ✭ 3,677 (+404.39%)
Mutual labels: automation, hacktoberfest
Shuffle
Shuffle: A general purpose security automation platform platform. We focus on accessibility for all.
Stars: ✭ 424 (-41.84%)
Mutual labels: automation, hacktoberfest
Beehive
A flexible event/agent & automation system with lots of bees 🐝
Stars: ✭ 5,348 (+633.61%)
Mutual labels: automation, hacktoberfest
Archiver
Easily create & extract archives, and compress & decompress files of various formats
Stars: ✭ 3,373 (+362.69%)
Mutual labels: hacktoberfest, extract
Topydo
A powerful todo list application for the console, using the todo.txt format.
Stars: ✭ 511 (-29.9%)
Mutual labels: todo, hacktoberfest
Leasot
Intelligently parse and output TODOs and FIXMEs from comments in your files
Easily extract, collect and report TODOs and FIXMEs in your code. This project uses regex in order to extract your todos from comments.
Comment format
TODO: add some info
- Spaces are optional.
- Colon is optional.
- Must be in a comment (line or block) in its' own line (
some code(); //TODO: do something
is not supported). - Can be prefixed with a @ (i.e @TODO).
- Spaces are trimmed around comment text.
- Supported default types are
TODO
andFIXME
- case insensitive. - Additional types can be added (using
tags
in cli andcustomTags
inleasot.parse
) - New extensions can be associated with bundled parsers as many languages have overlapping syntax
- Supports both leading and trailing references. Examples:
// TODO(tregusti): Make this better
// TODO: Text /tregusti
Supported languages
49+ languages are supported, pull requests for additional language support is most welcomed!
Usage in command line
npm install --global leasot
Command line help
$ leasot --help
Usage: leasot [options] <file ...>
Parse and output TODOs and FIXMEs from comments in your files
Options:
-V, --version output the version number
-A, --associate-parser [ext,parser] associate unknown extensions with bundled parsers (parser optional / default: defaultParser) (default: {})
-i, --ignore <patterns> add ignore patterns (default: [])
-I, --inline-files parse possible inline files (default: false)
-r, --reporter [reporter] use reporter (table|json|xml|markdown|vscode|raw) (default: table) (default: "table")
-S, --skip-unsupported skip unsupported filetypes (default: false)
-t, --filetype [filetype] force the filetype to parse. Useful for streams (default: .js)
-T, --tags <tags> add additional comment types to find (alongside todo & fixme) (default: [])
-x, --exit-nicely exit with exit code 0 even if todos/fixmes are found (default: false)
-h, --help output usage information
Examples:
# Check a specific file
$ leasot index.js
# Check php files with glob
$ leasot '**/*.php'
# Check multiple different filetypes
$ leasot 'app/**/*.js' test.rb
# Use the json reporter
$ leasot --reporter json index.js
# Search for REVIEW comments as well
$ leasot --tags review index.js
# Add ignore pattern to filter matches
$ leasot 'app/**/*.js' --ignore '**/custom.js'
# Search for REVIEW comments as well
$ leasot --tags review index.js
# Check a stream specifying the filetype as coffee
$ cat index.coffee | leasot --filetype .coffee
# Report from leasot parsing and filter todos using `jq`
$ leasot 'tests/**/*.styl' --reporter json | jq 'map(select(.tag == "TODO"))' | leasot-reporter
# Associate a parser for an unknown extension`
$ leasot -A '.svelte,twigParser' -A '.svelte,defaultParser' 'frontend/*.svelte'
Usage in NPM scripts
Use leasot -x
in order to prevent exiting with a non-zero exit code. This is a good solution if you plan to
run leasot
in a CI tool to generate todos.
{
"scripts": {
"todo": "leasot 'src/**/*.js'",
"todo-ci": "leasot -x --reporter markdown 'src/**/*.js' > TODO.md"
},
"devDependencies": {
"leasot": "^7.0.0"
}
}
Programmatic Installation
npm install --save-dev leasot
Programmatic Examples
const fs = require('fs');
const leasot = require('leasot');
const contents = fs.readFileSync('./contents.js', 'utf8');
// get the filetype of the file, or force a special parser
const filetype = path.extname('./contents.js');
// add file for better reporting
const file = 'contents.js';
const todos = leasot.parse(contents, { extension: filetype, filename: file });
// -> todos now contains the array of todos/fixme parsed
const output = leasot.report(todos, 'json', { spacing: 2 });
console.log(output);
// -> json output of the todos
Leasot with build tools
API
const leasot = require('leasot');
Mainly, you should be using 2 functions:
Built-in Reporters
License
MIT © Gilad Peleg
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].