Showing 44 of 102 total issues
File postinstall.js
has 2310 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
Function exports
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = env => {
const platform = env && (env.android && "android" || env.ios && "ios");
if (!platform) {
throw new Error("You need to provide a target platform!");
}
File postinstall.js
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var fs = require('fs');
var path = require('path');
var prompt = require('prompt-lite');
const FABRIC_GRADLE_TOOLS = '1.+'
Function getInput
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prompt.getInput = function (prop, callback) {
var schema = prop.schema || prop,
propName = prop.path && prop.path.join(':') || prop,
storedSchema = prompt.properties[propName.toLowerCase()],
delim = prompt.delimiter,
Function exports
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = env => {
const platform = env && (env.android && "android" || env.ios && "ios");
if (!platform) {
throw new Error("You need to provide a target platform!");
}
Function validateProperty
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validateProperty(object, value, property, schema, options, errors) {
var format,
valid,
spec,
type;
Function writeFabricServiceGradleHook
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeFabricServiceGradleHook(config) {
console.log("Install Fabric-build-gradle hook.");
try {
if (!fs.existsSync(path.join(appRoot, "hooks"))) {
fs.mkdirSync(path.join(appRoot, "hooks"));
Function writeFabricServiceGradleHook
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeFabricServiceGradleHook(config) {
console.log("Install Fabric-build-gradle hook.");
try {
if (!fs.existsSync(path.join(appRoot, "hooks"))) {
fs.mkdirSync(path.join(appRoot, "hooks"));
Function get
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prompt.get = function (schema, callback) {
//
// Transforms a full JSON-schema into an array describing path and sub-schemas.
// Used for iteration purposes.
//
Function zalgo
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function zalgo(text, options) {
var soul = {
"up" : [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
Function read
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function read (opts, cb) {
if (opts.num) {
throw new Error('read() no longer accepts a char number limit')
}
Function iterate
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function iterate(schema, get, done) {
var iterator = [],
result = {};
if (typeof schema === 'string') {
Function writeXcodeData
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeXcodeData(config) {
console.log("Install Fabric-build-xcode hook.");
try {
Function writeXcodeData
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function writeXcodeData(config) {
console.log("Install Fabric-build-xcode hook.");
try {
Function auto
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async.auto = function (tasks, callback) {
callback = callback || function () {};
var keys = _keys(tasks);
if (!keys.length) {
return callback(null);
Function stylize
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function stylize(str, style) {
var styles;
if (exports.mode === 'console') {
Function queue
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async.queue = function (worker, concurrency) {
var workers = 0;
var q = {
tasks: [],
concurrency: concurrency,
Function validateObject
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validateObject(object, schema, options, errors) {
var props, allProps = Object.keys(object),
visitedProps = [];
// see 5.2
Function heComes
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function heComes(text, options) {
var result = '', counts, l;
options = options || {};
options["up"] = options["up"] || true;
options["mid"] = options["mid"] || true;
Function logError
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
logError(error: any, msg?: string): void {
if (this.initDone) {
try {
if (!error.android) {
if (!!msg) {
- 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"