 		regex = XRegExp @regex, @regexFlags
 
 		XRegExp.forEach output, regex, (match, i) =>
-			msg =
+			messages.push
 				filePath: @editor.getPath()
 				range: @computeRange match
 				type: 'warning'
 				text: match.message
-
-			messages.push msg
 		, this
 
 		messages


		# Ranges are 0-based
		[
			[rowStart - 1, colStart - 1],
			[rowEnd - 1, colEnd - 1]
		]

	destroy: ->


	regexFlags: 'i'

	constructor: ->
		@subscriptions = new CompositeDisposable

		@subscriptions.add atom.config.observe 'linter-liferay.lintJS', => @args = @formatArgs()
