<commit_before>"""Tools for checking environment variables"""

import os
from configparser import NoOptionError

from .config import CONFIG

def path_sufficient():
    """
    Checks whether all of the given paths are in the PATH environment
    variable
    """
    paths = CONFIG.get('important', 'pathitems').split(':')
    for path in paths:
        if path not in os.environ['PATH']:
            return ('PROB_PATH_NOT_COMPLETE', path)<commit_msg>Add checker for LD_LIBRARY_PATH env variable<commit_after>"""Tools for checking environment variables"""

import os
from configparser import NoOptionError

from .config import CONFIG

def path_sufficient():
    """
    Checks whether all of the given paths are in the PATH environment
    variable
    """
    paths = CONFIG.get('important', 'pathitems').split(':')
    for path in paths:
        if path not in os.environ['PATH']:
            return ('PROB_PATH_NOT_COMPLETE', path)

def ld_lib_path_sufficient():
    """
    Checks whether all of the given paths are in the LD_LIBRARY_PATH
    einvironment variable
    """
    paths = CONFIG.get('important', 'ldlibitems').split(':')
    for path in paths:
        if path not in os.environ['LD_LIBRARY_PATH']:
            return ('PROB_LD_PATH_NOT_COMPLETE', path)
{'fraction_non_alphanumeric': 0.10078740157480315, 'fraction_numerical': 0.0, 'mean_word_length': 3.491166077738516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5960679', 'n_tokens_mistral': 365, 'n_tokens_neox': 358, 'n_words': 124}