![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Scan for NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, and BUG comments within your source, and print them to stdout so you can deal with them.
Scan for NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, and BUG comments within your
source, and print them to stdout so you can deal with them. This is similar to
the rake notes
task from Rails.
It ends up giving you an output like this:
The color formatting is currently done using the excellent terminal coloring library chalk.
Fixme currently scans your matching files line-by-line looking for annotations in the code. As such; multi-line annotation capturing is currently not supported. All annotations must be on the same line.
In order to use Fixme all you need to do is install it:
npm install -g fixme
Note: There really shouldn't be much reason to globally install it...
Require it:
var fixme = require('fixme');
And finally; configure it when you call it:
// All values below are Fixme default values unless otherwise overridden here.
fixme({
path: process.cwd(),
ignored_directories: ['node_modules/**', '.git/**', '.hg/**'],
file_patterns: ['**/*.js', 'Makefile', '**/*.sh'],
file_encoding: 'utf8',
line_length_limit: 1000
});
You should then see some nice output when this is run:
• path/to/your/directory/file.js [4 messages]:
[Line 1] ✐ NOTE: This is here because sometimes an intermittent issue appears.
[Line 7] ↻ OPTIMIZE: This could be reworked to not do a O(N2) lookup.
[Line 9] ✓ TODO from John: Add a check here to ensure these are always strings.
[Line 24] ✄ HACK: I am doing something here that is horrible, but it works for now...
[Line 89] ✗ XXX: Let's do this better next time? It's bad.
[Line 136] ☠ FIXME: We sometimes get an undefined index in this array.
[Line 211] ☢ BUG: If the user inputs "Easter" we always output "Egg", even if they wanted a "Bunny".
Using this as a GulpJS task is pretty simple, here is a very straight-forward "notes" task:
gulp.task('notes', fixme);
That, of course, assumes all of the defaults in Fixme are ok with you. If not, this is still pretty simple to configure and run as a Gulp task:
gulp.task('notes', function () {
fixme({
path: process.cwd(),
ignored_directories: ['node_modules/**', '.git/**', '.hg/**'],
file_patterns: ['**/*.js', 'Makefile', '**/*.sh'],
file_encoding: 'utf8',
line_length_limit: 1000
});
});
A code annotation needs to follow these rules to be picked up by Fixme:
You can have an author of a comment displayed via Fixme:
// NOTE(John Postlethwait): This comment will be shown as a note, and have an author!
[Line 1] ✐ NOTE from John Postlethwait: This comment will be shown as a note, and have an author!
Take a look at the test/annotation_test.js
file, all of those comments in
there are supported and expected to parse with Fixme.
FAQs
Scan for NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, and BUG comments within your source, and print them to stdout so you can deal with them.
The npm package fixme receives a total of 1,088 weekly downloads. As such, fixme popularity was classified as popular.
We found that fixme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.