<commit_before>" Author: zanona <https://github.com/zanona>
" Description: This file adds support for checking Less code with lessc.

call ale#Set('less_lessc_options', '')

function! ale_linters#less#lessc#GetCommand(buffer) abort
    return 'lessc'
    \   . ' --no-color --lint'
    \   . ' ' . ale#Var(a:buffer, 'less_lessc_options')
    \   . ' %t'
endfunction

function! ale_linters#less#lessc#Handle(buffer, lines) abort
    " Matches patterns like the following:<commit_msg>Fix imported files path lookup on less#lessc linter<commit_after>" Author: zanona <https://github.com/zanona>
" Description: This file adds support for checking Less code with lessc.

call ale#Set('less_lessc_options', '')

function! ale_linters#less#lessc#GetCommand(buffer) abort
    return 'cat %t | lessc'
    \   . ' --no-color --lint --include-path=' . expand('%:p:h')
    \   . ' ' . ale#Var(a:buffer, 'less_lessc_options')
    \   . ' -'
endfunction

function! ale_linters#less#lessc#Handle(buffer, lines) abort
    " Matches patterns like the following:
{'fraction_non_alphanumeric': 0.14080459770114942, 'fraction_numerical': 0.0, 'mean_word_length': 3.9526066350710902, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1973318', 'n_tokens_mistral': 352, 'n_tokens_neox': 349, 'n_words': 83}