Showing 135 of 207 total issues
Function watch
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
watch(origin, destination, opts = {}) {
this.unwatch();
this.status = WATCH_INIT;
return async(this, function* () {
Function stop
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop(system, instances, options = {}) {
options = _.defaults(options, {
kill: false,
remove: true,
});
Function runDaemon
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runDaemon(system, options = {}) {
return async(this, function* () {
// TODO: add instances and dependencies options
// Prepare options
var image = yield this._check_image(system, options);
Function constructor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(...args) {
super(...args);
var name = 'ruby';
// Readable name for this suggestion
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(...args) {
super(...args);
var name = 'php_composer';
var version = '5.6';
Function cli
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function cli(args, cwd, ui = UI) {
var result, azk_cli;
try {
args = args.slice(2);
[azk_cli, result] = run(args, cwd, ui = UI);
Function result
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var result = defer((resolver, reject) => {
var escape = (key, container, next) => {
if (key === ".") {
process.nextTick(() => {
lazy.docker.getContainer(container).stop({ t: 5000 }).catch(reject);
Function _activeDockerMonitor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_activeDockerMonitor(retry = 3) {
var docker_host = config("docker:host");
log.debug(t("docker.monitor.start", { docker_host, retry }));
var stop = () => {
Function require
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Module.prototype.require = function(file, ...args) {
var result, require = () => {
return original.apply(this, [file, ...args]);
};
Function pull
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function pull(docker, repository, tag) {
var image = `${repository}:${tag}`;
var promise = docker.createImage({
fromImage: repository,
tag: tag,
Function index
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
index(params) {
return async(this, function* () {
if (params.filename) {
this.showFilename();
return 0;
Function systems_data
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let systems_data = _.reduce(systems, (data, system) => {
var obj = {};
obj[system.image.provider] = system.image.name;
var system_data = {
depends : system.options.depends,
Function runProvision
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
runProvision(system, options = {}) {
return async(this, function* () {
var steps = system.provision_steps;
options = _.clone(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 constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
constructor(options) {
this.system = options.system || { image_name_suggest: null };
// Extract provider information
// 2. i.e.: { docker: 'azukiapp/azktcl:0.0.2' }
- 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 full
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
full(opts) {
return async(this, function* () {
// Get agent status
var agent = yield lazy.Client.status();
var require_vm = config("agent:requires_vm");
Function connect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
connect(wait, callback) {
var execute = () => {
return defer((done) => {
var client = new ssh2();
var options = {
Function stop
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop(vm_name, force = false, timeout = 30) {
log.debug("[vm] call to stop vm %s", vm_name);
return Tools.async_status("vm", this, function* (status_change) {
var info = yield vm.info(vm_name);
Function nameServers
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nameServers(custom_dns_servers, options={}) {
var dns_servers;
var nameservers = config(cache_key);
var env_dns_servers = envDefaultArray('AZK_DNS_SERVERS', []);
Function linux
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
linux() {
if (config('agent:requires_vm')) {
return this._checksForRequiresVm();
} else {
var socket = config('docker:socket');
Function _getNetworkIp
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getNetworkIp(suggestion) {
var question = {
name : 'ip',
message : 'configure.ip_question',
// default : config('agent:vm:ip'),