src/manifest/get_project.js
File get_project.js
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { path, lazy_require, config, log, fsAsync } from 'azk';
import { async, promiseResolve, promiseReject } from 'azk/utils/promises';
import { UIProxy } from 'azk/cli/ui';
import { matchFirstRegex, matchAllRegex, fulltrim } from 'azk/utils/regex_helper';
import { printOutput } from 'azk/utils/spawn_helper';
Function parseCommandOptions
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
static parseCommandOptions(opts) {
var is_start = opts.start;
var system_name = opts.system;
var git_repo = opts['git-repo'];
var git_ref = opts['git-ref'];
- 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 parseCommandOptions
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static parseCommandOptions(opts) {
var is_start = opts.start;
var system_name = opts.system;
var git_repo = opts['git-repo'];
var git_ref = opts['git-ref'];
Function startProject
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
startProject(command_parse_result) {
return async(this, function* () {
var force_azk_start_url_endpoint = config('urls:force:endpoints:start');
this._sendForceAzkStart(command_parse_result, force_azk_start_url_endpoint);
Function _checkGitError
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_checkGitError(git_repo, git_branch_tag_commit, git_destination_path) {
return function (err) {
var original_error = err.message;
var stack_trace = err.stack || '';
var error_type;