File build.py
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
import json
import os
import shutil
from os import path
from pathlib import Path
Function setup_node
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def setup_node(should_cache: bool, bucket, s3_client):
'''
Sets up node and installs dependencies.
Uses the node version specified in the cloned repo's .nvmrc
- 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 download_hugo
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Wontfix
def download_hugo():
logger = get_logger('download-hugo')
HUGO_VERSION_PATH = CLONE_DIR_PATH / HUGO_VERSION
if HUGO_VERSION_PATH.is_file():
- 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 setup_bundler
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Wontfix
def setup_bundler(should_cache: bool, bucket, s3_client):
logger = get_logger('setup-bundler')
def runp(cmd):
return run(logger, cmd, cwd=CLONE_DIR_PATH, env={}, ruby=True)
- 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 build_jekyll
has 7 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def build_jekyll(branch, owner, repository, site_prefix,
Function build_env
has 6 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def build_env(branch, owner, repository, site_prefix, base_url,
Function run_build_script
has 6 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def run_build_script(branch, owner, repository, site_prefix,
Function build_hugo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def build_hugo(branch, owner, repository, site_prefix,