<commit_before>"============================================================================
"File:        nit.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer:  <NAME> <<EMAIL>>
"License:     This program is free software. It comes without any warranty,
"             to the extent permitted by applicable law. You can redistribute
"             it and/or modify it under the terms of the Do What The Fuck You
"             Want To Public License, Version 2, as published by Sam Hocevar.
"             See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("loaded_nit_syntax_checker")
	finish
endif
let loaded_nit_syntax_checker = 1

" check if nitc is accessible
if !executable("nitc")
	finish
endif

function! SyntaxCheckers_nit_GetLocList()
	let makeprg = "nitc --no-color --only-metamodel 2>&1 " . shellescape(expand("%"))
	let errorformat =
		\'%f:%l\,%c--%*[0-9]: %m,
		\%f:%l\,%c--%*[0-9]\,0: %m,
		\%f:%l\,%c: %m'
	return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })<commit_msg>misc: correctly handles warnings in syntastic Nit syntax checker<commit_after>"============================================================================
"File:        nit.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer:  <NAME> <<EMAIL>>
"License:     This program is free software. It comes without any warranty,
"             to the extent permitted by applicable law. You can redistribute
"             it and/or modify it under the terms of the Do What The Fuck You
"             Want To Public License, Version 2, as published by Sam Hocevar.
"             See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("loaded_nit_syntax_checker")
	finish
endif
let loaded_nit_syntax_checker = 1

" check if nitc is accessible
if !executable("nitc")
	finish
endif

function! SyntaxCheckers_nit_GetLocList()
	let makeprg = "nitc --no-color --only-metamodel 2>&1 " . shellescape(expand("%"))
	" possible combinations of error messages
	let ef_start = [ '%f:%l\,%c--%*[0-9]:', '%f:%l\,%c--%*[0-9]\,%*[0-9]:', '%f:%l\,%c:' ]
	let ef_type = [ ' %tarning: ', ' %trror: ', ' Syntax %trror: ' ]

	" generate errorformat from combinations
	let errorformat = ""
	for s in ef_start
		for t in ef_type
			let errorformat .= s . t . '%m,'
		endfor
	endfor

	return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
{'fraction_non_alphanumeric': 0.23723487824037706, 'fraction_numerical': 0.007462686567164179, 'mean_word_length': 4.073705179282869, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6575344', 'n_tokens_mistral': 794, 'n_tokens_neox': 749, 'n_words': 239}