Showing 15 of 31 total issues
File build.js
has 609 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This is a custom build script that compiles a statically linkable object file of the underlying
// libc (musl) and this package's functionality to LLVM bitcode.
// This is super experimental, doesn't cover all of musl and will probably require a lot of tweaks
// in the future. If you need something special from libc, feel free to send a PR, but beware that
Function main
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
Function load
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function load(file, options) {
/**
* Options as used by {@link load}.
* @interface LoadOptions
Function main
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function load(file, options) {
/**
* Options as used by {@link load}.
* @interface LoadOptions
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function main
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
Function main
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
Function main
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
Function main
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function main
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
exports.run = function run(cmd, argv, options) {
if (!argv)
argv = [];
if (!options)
options = {};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.run = function run(cmd, argv, options) {
if (!argv)
argv = [];
if (!options)
options = {};
Function download
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function download(callback) {
var req = https.get("https://github.com/dcodeIO/webassembly/releases/download/" + pkg.tools + "/" + archive, res => {
if (res.statusCode !== 200) {
req.abort();
callback(Error("no prebuilt binaries available for " + platform + " (code " + res.statusCode + ")"));
Function main
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
exports.main = (argv, callback) => {
if (!callback)
callback = util.defaultCallback;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function req
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var req = https.get("https://github.com/dcodeIO/webassembly/releases/download/" + pkg.tools + "/" + archive, res => {
if (res.statusCode !== 200) {
req.abort();
callback(Error("no prebuilt binaries available for " + platform + " (code " + res.statusCode + ")"));
return;